From: Zhang, Yang Z <yang.z.zhang@intel.com>
Date: Thu, 18 Apr 2013 02:11:54 +0000 (-0300)
Subject: KVM: x86: Fix posted interrupt with CONFIG_SMP=n
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ffbbbbab34ef84b89f8b9f50a5f0fed5795d79a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

KVM: x86: Fix posted interrupt with CONFIG_SMP=n

->send_IPI_mask is not defined on UP.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c84f0cb921f9..a05cca608848 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3946,10 +3946,12 @@ static void vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector)
 
 	r = pi_test_and_set_on(&vmx->pi_desc);
 	kvm_make_request(KVM_REQ_EVENT, vcpu);
+#ifdef CONFIG_SMP
 	if (!r && (vcpu->mode == IN_GUEST_MODE))
 		apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
 				POSTED_INTR_VECTOR);
 	else
+#endif
 		kvm_vcpu_kick(vcpu);
 }