# HG changeset patch # User Keir Fraser # Date 1272972545 -3600 # Node ID 6d21da6feb59db33eceb3aa6bcb8afac15ac7fd8 # Parent 71cf9b12ac9effe2b7cf0aec058f92ee36430e0a vmx, tboot: Check the correct in/outside-SMX flag when init'ing VMX. Signed-off-by: Shane Wang Signed-off-by: Keir Fraser --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -360,8 +360,9 @@ int vmx_cpu_up(void) bios_locked = !!(eax & IA32_FEATURE_CONTROL_MSR_LOCK); if ( bios_locked ) { - if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX | - IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) ) + if ( !(eax & (tboot_in_measured_env() + ? IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX + : IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX)) ) { printk("CPU%d: VMX disabled by BIOS.\n", cpu); return 0;