From 55c05701a2b0e96c81d7bfd362d91460713fc1dc Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 23 Mar 2009 18:01:29 +0200 Subject: [PATCH] --- yaml --- r: 146509 b: refs/heads/master c: 919818abc2ca0721f1cd296fbc24601d9044f993 h: refs/heads/master i: 146507: b1dff67686f6c38ac712b787c14e646ef85fb7ca v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/vmx.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d8ed82caf8f6..6c0955da9116 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4462d21a615dfd0c0f672c10832a011d6f280d5a +refs/heads/master: 919818abc2ca0721f1cd296fbc24601d9044f993 diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index f4b6c4bcee29..9b97c8e3cfd1 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -1202,6 +1202,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) vmx_capability.ept, vmx_capability.vpid); } + if (!cpu_has_vmx_vpid()) + enable_vpid = 0; + min = 0; #ifdef CONFIG_X86_64 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; @@ -2082,7 +2085,7 @@ static void allocate_vpid(struct vcpu_vmx *vmx) int vpid; vmx->vpid = 0; - if (!enable_vpid || !cpu_has_vmx_vpid()) + if (!enable_vpid) return; spin_lock(&vmx_vpid_lock); vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);