ia64/xen-unstable

changeset 16676:43aab98aef60

vmx: Fix the 2nd argument of cpuid_count() in vmx_cpuid_intercept()

For input 0x00000004, the value of "*ecx" has been overwritten by the
cpuid() in hvm_cpuid(), causing a bad value passed to cpuid_count().

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Dec 29 17:55:47 2007 +0000 (2007-12-29)
parents 688e9186eed4
children c5deb251b9dc
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Sat Dec 29 17:52:34 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Sat Dec 29 17:55:47 2007 +0000
     1.3 @@ -1235,6 +1235,7 @@ void vmx_cpuid_intercept(
     1.4      unsigned int *ecx, unsigned int *edx)
     1.5  {
     1.6      unsigned int input = *eax;
     1.7 +    unsigned int count = *ecx;
     1.8  
     1.9  #ifdef VMXASSIST
    1.10      if ( input == 0x40000003 )
    1.11 @@ -1293,7 +1294,7 @@ void vmx_cpuid_intercept(
    1.12          break;
    1.13  
    1.14      case 0x00000004:
    1.15 -        cpuid_count(input, *ecx, eax, ebx, ecx, edx);
    1.16 +        cpuid_count(input, count, eax, ebx, ecx, edx);
    1.17          *eax &= NUM_CORES_RESET_MASK;
    1.18          break;
    1.19