Message ID | 20240109141121.1619463-6-vkuznets@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-20961-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp134462dyi; Tue, 9 Jan 2024 06:13:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoXdvECtOJkFKaiswNbQI+UI9UdF+i1KR+P+q/eXN/jFmT6QIO+wYFKEs6OuaWireOvhFK X-Received: by 2002:a2e:9c4f:0:b0:2cd:11f9:a616 with SMTP id t15-20020a2e9c4f000000b002cd11f9a616mr2428848ljj.53.1704809600605; Tue, 09 Jan 2024 06:13:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704809600; cv=none; d=google.com; s=arc-20160816; b=MdP6EB66+FfUrffO2JgYahWf+31ffytutN9NyK1VGKYjjlklCsebP3OCcQEkiCJZnH FSFfSBmCpr5W60/DD0xO8Warsf+2iJWafOw2VtjaYSjEg5whxhICfs1PeZSeqLx1DY22 6yO9veWOIf6/JWo3YNd1VUN16MaAaRF+OUy/WycX5mh+/Yp261n9T+rbcPvgZl09Hs9T IOZ2OmcoEEJpXLJrr8ushQO3UdQMbKVs/oFUJ3KR3PjQsK3l6gJ6RgxpBKga0ZBE8Ip6 OmAJzmOOcshQCD0jQ0Ai9h8pLDZDNRLpNiQ5fbyWn2vQRTs/2iCjTdaBk5teU0R5SW0z BnWg== 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=iDgGk9AqkfdB9KmMB1EEQzESiWoQzRB9G8la+60J3pw=; fh=56b0f9amB/d14Cru5+rTzdvRVvg1qsHx+cb1CsaZSXE=; b=Iq8xHwh62egi1kKgDiENdRR8yJtLmeMeB92xvtjMljeenx80Qy2Q6NY8vO/VMYXF77 s2fpG1goZdix6hZBqIurVhKF8b/Ex1Wo0JwvnYwIr6dbBzP3g1gn9J/4rz8gRz/cbt2p ez08URzQiRnVp2zk95t+EgtCtdN4Ey/PzKHEgkIy41cRdOcjO+xAFrliiC4/iqb+mIuD KVynxkYnCi63bK+djwPj3IUrg1eikHZD2c1IFV/4DqA3DcbIiNbHBjE+wPomDwElMxHn EEFR2jKA5VVdasju4Tu3J2R06frL702xzUN2aE0koIqwZp8tqTow4tajIzWl9D60vbbv b05w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YIPWLvkA; spf=pass (google.com: domain of linux-kernel+bounces-20961-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20961-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 w5-20020a05640234c500b00557c1791121si815881edc.439.2024.01.09.06.13.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:13:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20961-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=YIPWLvkA; spf=pass (google.com: domain of linux-kernel+bounces-20961-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20961-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 373581F25187 for <ouuuleilei@gmail.com>; Tue, 9 Jan 2024 14:13:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85DB23A8E3; Tue, 9 Jan 2024 14:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YIPWLvkA" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 A5AB03A1AA for <linux-kernel@vger.kernel.org>; Tue, 9 Jan 2024 14:11:33 +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=1704809492; 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=iDgGk9AqkfdB9KmMB1EEQzESiWoQzRB9G8la+60J3pw=; b=YIPWLvkAeSYtUJyT7jWBdJO0U5+J0cZ2u6l5e1ioGuQYwJ3mhmBs6RmWyK+a6E19Rqfhyu yu4l+begTAv5VeAnM8Rj0E7NrVvBMSZP8tl8PEjxOJHjRHhnW+yw35IfALetISa0KvnC7Q 3lxclUYkuE+UyM0dPvCQTyVreWwtfjI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-wnYQVk-1M2mfovKXhcdi5A-1; Tue, 09 Jan 2024 09:11:29 -0500 X-MC-Unique: wnYQVk-1M2mfovKXhcdi5A-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 0632338425A4; Tue, 9 Jan 2024 14:11:29 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A4151E3; Tue, 9 Jan 2024 14:11:27 +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 5/5] KVM: x86: Make gtod_is_based_on_tsc() return 'bool' Date: Tue, 9 Jan 2024 15:11:21 +0100 Message-ID: <20240109141121.1619463-6-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: 1787622431781896736 X-GMAIL-MSGID: 1787622431781896736 |
Series |
KVM: selftests: Fix clocksource requirements in tests
|
|
Commit Message
Vitaly Kuznetsov
Jan. 9, 2024, 2:11 p.m. UTC
gtod_is_based_on_tsc() is boolean in nature, i.e. it returns '1' for good
clocksources and '0' otherwise. Moreover, its result is used raw by
kvm_get_time_and_clockread()/kvm_get_walltime_and_clockread() which are
'bool'.
No functional change intended.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 27e23714e960..2aba11eb58ac 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2507,7 +2507,7 @@ static u64 compute_guest_tsc(struct kvm_vcpu *vcpu, s64 kernel_ns) } #ifdef CONFIG_X86_64 -static inline int gtod_is_based_on_tsc(int mode) +static inline bool gtod_is_based_on_tsc(int mode) { return mode == VDSO_CLOCKMODE_TSC || mode == VDSO_CLOCKMODE_HVCLOCK; }