linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Don't sending posted interrupt if not config CONFIG_SMP
@ 2013-04-18  0:57 Yang Zhang
  0 siblings, 0 replies; only message in thread
From: Yang Zhang @ 2013-04-18  0:57 UTC (permalink / raw)
  To: kvm
  Cc: gleb, mtosatti, rdunlap, rientjes, sfr, linux-next, x86,
	linux-kernel, Yang Zhang

From: Yang Zhang <yang.z.zhang@Intel.com>

If not config smp, posted interrupt logic will not work. So we should not 
send posted interrupt and let vcpu to pick the pending interrupt before
vmentry.

Without this patch, the build fails when CONFIG_SMP is disabled.
Thanks Randy to report this issue.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
---
 arch/x86/kvm/vmx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 52b21da..d5c6b95 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);
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-18  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18  0:57 [PATCH] KVM: x86: Don't sending posted interrupt if not config CONFIG_SMP Yang Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).