* [PATCH] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest
@ 2022-09-22 23:18 Jim Mattson
2022-09-27 14:14 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Jim Mattson @ 2022-09-22 23:18 UTC (permalink / raw)
To: kvm, pbonzini, seanjc; +Cc: Jim Mattson
The only thing reported by CPUID.9 is the value of
IA32_PLATFORM_DCA_CAP[31:0] in EAX. This MSR doesn't even exist in the
guest, since CPUID.1:ECX.DCA[bit 18] is clear in the guest.
Clear CPUID.9 in KVM_GET_SUPPORTED_CPUID.
Fixes: 24c82e576b78 ("KVM: Sanitize cpuid")
Signed-off-by: Jim Mattson <jmattson@google.com>
---
arch/x86/kvm/cpuid.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 75dcf7a72605..675eb9ae3948 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -897,8 +897,6 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
entry->edx = 0;
}
break;
- case 9:
- break;
case 0xa: { /* Architectural Performance Monitoring */
union cpuid10_eax eax;
union cpuid10_edx edx;
--
2.37.3.998.g577e59143f-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest
2022-09-22 23:18 [PATCH] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest Jim Mattson
@ 2022-09-27 14:14 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2022-09-27 14:14 UTC (permalink / raw)
To: Jim Mattson, kvm, seanjc
On 9/23/22 01:18, Jim Mattson wrote:
> The only thing reported by CPUID.9 is the value of
> IA32_PLATFORM_DCA_CAP[31:0] in EAX. This MSR doesn't even exist in the
> guest, since CPUID.1:ECX.DCA[bit 18] is clear in the guest.
>
> Clear CPUID.9 in KVM_GET_SUPPORTED_CPUID.
>
> Fixes: 24c82e576b78 ("KVM: Sanitize cpuid")
> Signed-off-by: Jim Mattson <jmattson@google.com>
> ---
> arch/x86/kvm/cpuid.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 75dcf7a72605..675eb9ae3948 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -897,8 +897,6 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
> entry->edx = 0;
> }
> break;
> - case 9:
> - break;
> case 0xa: { /* Architectural Performance Monitoring */
> union cpuid10_eax eax;
> union cpuid10_edx edx;
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-27 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 23:18 [PATCH] KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest Jim Mattson
2022-09-27 14:14 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.