public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID
@ 2022-09-23 22:33 Jim Mattson
  2022-09-26 20:50 ` Sean Christopherson
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Mattson @ 2022-09-23 22:33 UTC (permalink / raw)
  To: kvm, pbonzini, seanjc; +Cc: Jim Mattson

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 22:33 [PATCH] KVM: x86: Pass host's CPUID.16H through to KVM_GET_SUPPORTED_CPUID Jim Mattson
2022-09-26 20:50 ` Sean Christopherson
2022-09-26 21:13   ` Jim Mattson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox