aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-29 17:55:47 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-29 17:55:47 +0000
commitca4bd2c1aea9818c9220d2a8c967fa1187448ad5 (patch)
treedd0f5971bc2047a98938c2e7285870ac1950e24f
parent86d2ef9f49f45376fa6038159969e5f7a18ed4c0 (diff)
downloadxen-ca4bd2c1aea9818c9220d2a8c967fa1187448ad5.tar.gz
xen-ca4bd2c1aea9818c9220d2a8c967fa1187448ad5.tar.bz2
xen-ca4bd2c1aea9818c9220d2a8c967fa1187448ad5.zip
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>
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 1e700d8d2e..b414078ab2 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1235,6 +1235,7 @@ void vmx_cpuid_intercept(
unsigned int *ecx, unsigned int *edx)
{
unsigned int input = *eax;
+ unsigned int count = *ecx;
#ifdef VMXASSIST
if ( input == 0x40000003 )
@@ -1293,7 +1294,7 @@ void vmx_cpuid_intercept(
break;
case 0x00000004:
- cpuid_count(input, *ecx, eax, ebx, ecx, edx);
+ cpuid_count(input, count, eax, ebx, ecx, edx);
*eax &= NUM_CORES_RESET_MASK;
break;