From: Jim Mattson <jmattson@google.com>
To: kvm@vger.kernel.org, pbonzini@redhat.com, seanjc@google.com
Cc: Jim Mattson <jmattson@google.com>
Subject: [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID
Date: Fri, 23 Sep 2022 15:33:38 -0700 [thread overview]
Message-ID: <20220923223338.483103-1-jmattson@google.com> (raw)
In the default configuration, the guest TSC frequency is the same as
the host TSC frequency. Similarly, the maximum frequency of the
virtual CPU is the same as the maximum frequency of the physical
CPU. Also, the bus (reference) frequency of the virtual CPU matches
that of the physical CPU.
Pass this information directly from host CPUID.16H to guest CPUID.16H
in KVM_GET_SUPPORTED_CPUID.
Signed-off-by: Jim Mattson <jmattson@google.com>
---
arch/x86/kvm/cpuid.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 675eb9ae3948..1527f467d4f8 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1043,6 +1043,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
goto out;
}
break;
+ /* Processor Frequency Information */
+ case 0x16:
+ break;
/* Intel AMX TILE */
case 0x1d:
if (!kvm_cpu_cap_has(X86_FEATURE_AMX_TILE)) {
--
2.37.3.998.g577e59143f-goog
next reply other threads:[~2022-09-23 22:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 22:33 Jim Mattson [this message]
2022-09-26 20:50 ` [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID Sean Christopherson
2022-09-26 21:13 ` Jim Mattson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220923223338.483103-1-jmattson@google.com \
--to=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox