From 0c9e7f62b24f12c063473c36e88817cb3cab746d Mon Sep 17 00:00:00 2001 From: neel Date: Wed, 13 Feb 2013 23:22:17 +0000 Subject: 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(-) (limited to 'sys/amd64') diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 94abe09..13eaaad 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 -- cgit v1.1