[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/15] KVM: Fix XSAVE feature bit enumeration
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 14/15] KVM: Fix XSAVE feature bit enumeration |
Date: |
Tue, 21 Jun 2011 14:08:03 -0300 |
From: Andre Przywara <address@hidden>
When iterating through the XSAVE feature enumeration CPUID leaf (0xD)
we should not stop at the first zero EAX, but instead keep scanning
since there are gaps in the enumeration (ECX=1 for instance).
This fixes the proper usage of AVX in KVM guests.
Signed-off-by: Andre Przywara <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
target-i386/kvm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 938e0a3..10fb2c4 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -416,6 +416,9 @@ int kvm_arch_init_vcpu(CPUState *env)
case 0xb:
case 0xd:
for (j = 0; ; j++) {
+ if (i == 0xd && j == 64) {
+ break;
+ }
c->function = i;
c->flags = KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
c->index = j;
@@ -428,7 +431,7 @@ int kvm_arch_init_vcpu(CPUState *env)
break;
}
if (i == 0xd && c->eax == 0) {
- break;
+ continue;
}
c = &cpuid_data.entries[cpuid_i++];
}
--
1.7.5.4
- [Qemu-devel] [PATCH 00/15] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 06/15] kvm: ppc: Drop CONFIG_KVM_PPC_PVR, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 12/15] kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuid, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 07/15] kvm: Drop useless zero-initializations, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 10/15] kvm: ppc: Drop KVM_CAP build dependencies, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 08/15] kvm: Drop KVM_CAP build dependencies, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 11/15] kvm: Clean up stubs, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 13/15] Remove unneeded kvm.h from cpu-exec.c, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 05/15] kvm: Drop CONFIG_KVM_PARA, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 14/15] KVM: Fix XSAVE feature bit enumeration,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 01/15] kvm: x86: Save/restore FPU OP, IP and DP, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 04/15] Switch build system to accompanied kernel headers, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 02/15] Add kernel header update script, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 15/15] kvm: fix FPU state subsection, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 09/15] kvm: x86: Drop KVM_CAP build dependencies, Marcelo Tosatti, 2011/06/21
- [Qemu-devel] [PATCH 03/15] Import kernel headers, Marcelo Tosatti, 2011/06/21
- Re: [Qemu-devel] [PATCH 00/15] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2011/06/22