Author: neel
Date: Wed Feb 13 23:22:17 2013
New Revision: 246774
URL: http://svnweb.freebsd.org/changeset/base/246774

Log:
  Requests for invalid CPUID leaves should map to the highest known leaf 
instead.
  
  Reviewed by:  grehan
  Obtained from:        NetApp

Modified:
  head/sys/amd64/vmm/x86.c

Modified: head/sys/amd64/vmm/x86.c
==============================================================================
--- head/sys/amd64/vmm/x86.c    Wed Feb 13 23:11:25 2013        (r246773)
+++ head/sys/amd64/vmm/x86.c    Wed Feb 13 23:22:17 2013        (r246774)
@@ -54,8 +54,6 @@ x86_emulate_cpuid(struct vm *vm, int vcp
        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 vcp
                *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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to