diff options
author | Sheng Yang <sheng@linux.intel.com> | 2010-06-17 15:18:14 +0800 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-06-28 13:06:03 -0300 |
commit | 51e49430c0472c9f609341e3058d47ed93dabe6e (patch) | |
tree | 6f8e65b5fb0cc8578aeef6d2598ba7e47d8d2d0f /target-i386 | |
parent | c958a8bd9b53371d4431ceabf55b21a0d0a557f2 (diff) |
Enable XSAVE related CPUID
We can support it in KVM now. The 0xd leaf is queried from KVM.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/cpuid.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index fe0e6b21a8..83057bdb2c 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -1087,6 +1087,27 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *ecx = 0; *edx = 0; break; + case 0xD: + /* Processor Extended State */ + if (!(env->cpuid_ext_features & CPUID_EXT_XSAVE)) { + *eax = 0; + *ebx = 0; + *ecx = 0; + *edx = 0; + break; + } + if (kvm_enabled()) { + *eax = kvm_arch_get_supported_cpuid(env, 0xd, count, R_EAX); + *ebx = kvm_arch_get_supported_cpuid(env, 0xd, count, R_EBX); + *ecx = kvm_arch_get_supported_cpuid(env, 0xd, count, R_ECX); + *edx = kvm_arch_get_supported_cpuid(env, 0xd, count, R_EDX); + } else { + *eax = 0; + *ebx = 0; + *ecx = 0; + *edx = 0; + } + break; case 0x80000000: *eax = env->cpuid_xlevel; *ebx = env->cpuid_vendor1; |