Instead of doing complex calculations and calling
kvm_arch_get_supported_cpuid() inside cpu_x86_cpuid(), calculate
the set of required XSAVE components earlier, at realize time.
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 51 ++++++++++++++++++++++++++++-----------------------
target-i386/cpu.h | 1 +
2 files changed, 29 insertions(+), 23 deletions(-)
@@ -2504,9 +2504,6 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,
uint32_t count,
*ebx &= 0xffff; /* The count doesn't need to be reliable. */
break;
case 0xD: {
- uint64_t ena_mask;
- int i;
-
/* Processor Extended State */
*eax = 0;
*ebx = 0;