Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373301 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2016-04-07 13:50 +0200 |
| Last post | 2016-04-07 16:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] KVM: x86: mask CPUID(0xD,0x1).EAX against host value Paolo Bonzini <pbonzini@redhat.com> - 2016-04-07 13:50 +0200
Re: [PATCH] KVM: x86: mask CPUID(0xD,0x1).EAX against host value Radim Krčmář <rkrcmar@redhat.com> - 2016-04-07 16:50 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2016-04-07 13:50 +0200 |
| Subject | [PATCH] KVM: x86: mask CPUID(0xD,0x1).EAX against host value |
| Message-ID | <rlgBI-3br-9@gated-at.bofh.it> |
This ensures that the guest doesn't see XSAVE extensions
(e.g. xgetbv1 or xsavec) that the host lacks.
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/cpuid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 8efb839948e5..bbbaa802d13e 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -534,6 +534,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
do_cpuid_1_ent(&entry[i], function, idx);
if (idx == 1) {
entry[i].eax &= kvm_cpuid_D_1_eax_x86_features;
+ cpuid_mask(&entry[i].eax, CPUID_D_1_EAX);
entry[i].ebx = 0;
if (entry[i].eax & (F(XSAVES)|F(XSAVEC)))
entry[i].ebx =
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Date | 2016-04-07 16:50 +0200 |
| Message-ID | <rljpU-5mp-23@gated-at.bofh.it> |
| In reply to | #1373301 |
2016-04-07 13:47+0200, Paolo Bonzini: > This ensures that the guest doesn't see XSAVE extensions > (e.g. xgetbv1 or xsavec) that the host lacks. > > Cc: stable@vger.kernel.org > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web