Message ID | 20240109141121.1619463-5-vkuznets@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-20962-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp134700dyi; Tue, 9 Jan 2024 06:13:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCLkKl+BAftkABQ7euVobaFT/fsVh31GMNJVj8pl0lQMw0kXjT0pFdkcwbreqo3MLVADpk X-Received: by 2002:a17:906:7007:b0:a28:4bf8:a16f with SMTP id n7-20020a170906700700b00a284bf8a16fmr493938ejj.136.1704809621251; Tue, 09 Jan 2024 06:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704809621; cv=none; d=google.com; s=arc-20160816; b=gwiVamS0sKUJUubW2JNT87hio1tmK8pKPht0dV4k5P31m+Ya5Jju4kz4SAzl17z70s N2ua+5VA8nuA27wqjmqML7h4HQecqhh7m2O1vnQgOH3xEPsqfiFowg2sSwb/ZDakzTuC RGdsyWBGo13QLqaG0V8Uz8MPPWENo/jbIcTU/JVpWcgAHjF/V/5nRYzHjMnJE7d4usnn VN/XZQ2f5c35Et5rIUQJZR+fn+PwsbqgwhhLzsUXVoIxREamt/xN47uvyaJ8sNcM7Ffg 4nbXB9X6axOgpYqE0KWr8iZTtf1iyF5feodbkY1q+ZmCc+VXifrR1ro5ZxY08YopVZL7 /5eA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b16-20020a170906491000b00a27e113a2b1si808765ejq.966.2024.01.09.06.13.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:13:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20962-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20962-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id D6D7B1F253C9 for <ouuuleilei@gmail.com>; Tue, 9 Jan 2024 14:13:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 813B93B189; Tue, 9 Jan 2024 14:11:41 +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 <linux-kernel@vger.kernel.org>; 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 <vkuznets@redhat.com> To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <seanjc@google.com> Cc: Oliver Upton <oupton@google.com>, 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787622453400544230 X-GMAIL-MSGID: 1787622453400544230 |
Series |
KVM: selftests: Fix clocksource requirements in tests
|
|
Commit Message
Vitaly Kuznetsov
Jan. 9, 2024, 2:11 p.m. UTC
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 <vkuznets@redhat.com>
---
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);