Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp349246rdd; Tue, 9 Jan 2024 06:13:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiIBO6DX5Jh+fU2yvlubCyH6pftplSj2EztTgSS/cKNnmxFhIjGB2jOoYCL8GUhTK+64No X-Received: by 2002:a05:620a:d86:b0:781:7909:febd with SMTP id q6-20020a05620a0d8600b007817909febdmr7141382qkl.124.1704809611674; Tue, 09 Jan 2024 06:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704809611; cv=none; d=google.com; s=arc-20160816; b=p+5xd8ya+fdDSBfa9r07spJXZ871OuacaxiZWSYGh1HcsWREPYbyACTrpfw2lhUwy7 JfoM8fP+JhJ3xVy653GQXcIJK2fHOJFCS+d69B++XLvaQH3DXQ/+MlwH8Gq73EwvLhmK k5DyZw+AIRrEt3vRlLuh+8gX2MVLjEZanVPW++u4ljJgejBWNIhcKIYCMwNZyf46Strp MZuOHlEDNWhVi6+IxH87+ai8NN6j2EUYvd4NQDfp/VpacBb8YwOdFWrw741gYQB9OhpD PizoG6fnpyDwUEnoFR6F+ZE6p3lwjD12m3gMeiWxzaHy1TbikjrtEX65iTQzCkV6AZtG SWRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=UKkzI2CsoNgX1WJTht9BzlNFsx76EWCSrLu3KlKlb+c=; fh=56b0f9amB/d14Cru5+rTzdvRVvg1qsHx+cb1CsaZSXE=; b=diqMH+udnxjF0AIiD2t3eOPKLIz8KHTuHPED75daNfTrcMv+STfcHnr0bn+cRFjWJ4 OUMdC6JwTZFSUUaZOUmRN1ajMNXWXNDKDpGnl33cIyUHmXP99d0qdW0/Q8o9/CirW5lb jw8pjpUICZunkjwMkCetSyC1N4Qgj6MyoCKv89tk8NbP6rTST+6GDUzye5FmXJG1ZYbu zt17amEivyGlQr5Uj81YeNYos+s6cFFeOFMMOK+jH9XqW4e1IVZX8gz243mkIYD6o5iD N3wSKaUkxTNyF/UHyMnEpYBcBL+uICcxL3W2OrfgApfwfXruSW/sC7+Lq79FkSz74qTF Yr3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E4SuWMQM; spf=pass (google.com: domain of linux-kernel+bounces-20962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r7-20020a05620a298700b007831f78b583si2308482qkp.625.2024.01.09.06.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:13:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E4SuWMQM; spf=pass (google.com: domain of linux-kernel+bounces-20962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 68A501C242CA for ; Tue, 9 Jan 2024 14:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B77533A8FE; Tue, 9 Jan 2024 14:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="E4SuWMQM" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A69943A8E7 for ; Tue, 9 Jan 2024 14:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704809496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UKkzI2CsoNgX1WJTht9BzlNFsx76EWCSrLu3KlKlb+c=; b=E4SuWMQM8HS7JqSVfUGGGlnnleNjvf/aXGwk7JfjTO3EBz3uhl6v+HUpylpRQfPcRinvie +A4tUlN4/QLLFEbk/c0meccJeGWcrIHiFQoz1b3xEA1/fNQRdOa33H3/VV//HQMsJ40Wb7 SbcV5EkwO5fU6wHYn46gp5yetGykggw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-544-laJp76qrNlyENke7orJW9w-1; Tue, 09 Jan 2024 09:11:28 -0500 X-MC-Unique: laJp76qrNlyENke7orJW9w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8C01185A781; Tue, 9 Jan 2024 14:11:27 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC87D51E3; Tue, 9 Jan 2024 14:11:26 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson Cc: Oliver Upton , linux-kernel@vger.kernel.org Subject: [PATCH 4/5] KVM: selftests: Make hyperv_clock require TSC based system clocksource Date: Tue, 9 Jan 2024 15:11:20 +0100 Message-ID: <20240109141121.1619463-5-vkuznets@redhat.com> In-Reply-To: <20240109141121.1619463-1-vkuznets@redhat.com> References: <20240109141121.1619463-1-vkuznets@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 KVM sets up Hyper-V TSC page clocksource for its guests when system clocksource is 'based on TSC' (see gtod_is_based_on_tsc()), running hyperv_clock with any other clocksource leads to imminent failure. Add the missing requirement to make the test skip gracefully. Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_clock.c b/tools/testing/selftests/kvm/x86_64/hyperv_clock.c index f5e1e98f04f9..02cc3c560566 100644 --- a/tools/testing/selftests/kvm/x86_64/hyperv_clock.c +++ b/tools/testing/selftests/kvm/x86_64/hyperv_clock.c @@ -212,6 +212,7 @@ int main(void) int stage; TEST_REQUIRE(kvm_has_cap(KVM_CAP_HYPERV_TIME)); + TEST_REQUIRE(sys_clocksource_is_based_on_tsc()); vm = vm_create_with_one_vcpu(&vcpu, guest_main); -- 2.43.0