From 25448de2229dedab00764dce8ff8618ea36b4e61 Mon Sep 17 00:00:00 2001 From: Neel Natu Date: Wed, 13 Feb 2013 23:22:17 +0000 Subject: [PATCH] Requests for invalid CPUID leaves should map to the highest known leaf instead. Reviewed by: grehan Obtained from: NetApp --- sys/amd64/vmm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 94abe09b33c..13eaaad99ad 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -54,8 +54,6 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, unsigned int func, regs[4]; enum x2apic_state x2apic_state; - func = *eax; - /* * Requests for invalid CPUID levels should map to the highest * available level instead. @@ -70,6 +68,8 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, *eax = cpu_high; } + func = *eax; + /* * In general the approach used for CPU topology is to * advertise a flat topology where all CPUs are packages with