public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Check KVM_REQ_IMMEDIATE_EXIT after enable_irq_window
@ 2013-04-28  7:23 Jan Kiszka
  2013-04-28  8:29 ` Gleb Natapov
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2013-04-28  7:23 UTC (permalink / raw)
  To: Gleb Natapov, Marcelo Tosatti; +Cc: kvm, Nakajima, Jun, Ren, Yongjie

From: Jan Kiszka <jan.kiszka@siemens.com>

The VMX implementation of enable_irq_window will raise
KVM_REQ_IMMEDIATE_EXIT if an interrupt window shall be opened during
nested vmrun. We have to transfer this request into the local variable
to avoid looping over a continuously re-asserted request on vmentry.

This issue only affects nested VMX scenarios.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/x86/kvm/x86.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2a434bf..57ff14a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5759,6 +5759,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 		else if (kvm_cpu_has_injectable_intr(vcpu) || req_int_win)
 			kvm_x86_ops->enable_irq_window(vcpu);
 
+		req_immediate_exit =
+			kvm_check_request(KVM_REQ_IMMEDIATE_EXIT, vcpu);
+
 		if (kvm_lapic_enabled(vcpu)) {
 			/*
 			 * Update architecture specific hints for APIC
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-03  5:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-28  7:23 [PATCH] KVM: x86: Check KVM_REQ_IMMEDIATE_EXIT after enable_irq_window Jan Kiszka
2013-04-28  8:29 ` Gleb Natapov
2013-04-28  8:50   ` [PATCH] KVM: x86: Rework request for immediate exit Jan Kiszka
2013-05-03  1:20     ` Marcelo Tosatti
2013-05-03  5:33       ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox