From b1397e72bf4f2678380646f3b3de2eaa7af5423f Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Wed, 28 Nov 2012 20:53:15 +0800 Subject: [PATCH] --- yaml --- r: 343549 b: refs/heads/master c: e6c7d32172f10b68fa9a3be05aa1231352a52171 h: refs/heads/master i: 343547: 2398588be16ecf266a575cf99e87724beed45b07 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/vmx.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 40a31141ff30..07cf96fc58d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 859f8450d8a334a7f7cb994e4676cf918deff832 +refs/heads/master: e6c7d32172f10b68fa9a3be05aa1231352a52171 diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index bb18923bf632..4406374e3b6d 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -1007,9 +1007,11 @@ static void __loaded_vmcs_clear(void *arg) static void loaded_vmcs_clear(struct loaded_vmcs *loaded_vmcs) { - if (loaded_vmcs->cpu != -1) - smp_call_function_single( - loaded_vmcs->cpu, __loaded_vmcs_clear, loaded_vmcs, 1); + int cpu = loaded_vmcs->cpu; + + if (cpu != -1) + smp_call_function_single(cpu, + __loaded_vmcs_clear, loaded_vmcs, 1); } static inline void vpid_sync_vcpu_single(struct vcpu_vmx *vmx)