Message ID | 62918f65ec78f8990278a6a0db0567968fa23e49.camel@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC] Further hack request_interrupt_window handling to work around kvm_cpu_has_interrupt() nesting breakage | expand |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 397f599b20e5..e23f0c8b4a16 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8830,7 +8830,10 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) } inject_pending_event(vcpu, &req_immediate_exit); - if (req_int_win) + /* Don't enable the interrupt window for userspace if + * kvm_cpu_has_interrupt() is set and we'd never actually + * exit with ready_for_interrupt_window set anyway. */ + if (req_int_win && !kvm_cpu_has_interrupt(vcpu) kvm_x86_ops.enable_irq_window(vcpu); if (kvm_lapic_enabled(vcpu)) {