diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2014-03-07 14:03:15 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-03-11 03:41:47 -0400 |
commit | c9a7953f09bbe2b66050ebf97e0532eaeefbc9f3 (patch) | |
tree | 8a4387796e3f9946cea1725566e584dff525c3f8 /arch/x86/kvm/x86.c | |
parent | 220c56729766444f3dd823f740a147ca6d82c4c6 (diff) |
KVM: x86: Remove return code from enable_irq/nmi_window
It's no longer possible to enter enable_irq_window in guest mode when
L1 intercepts external interrupts and we are entering L2. This is now
caught in vcpu_enter_guest. So we can remove the check from the VMX
version of enable_irq_window, thus the need to return an error code from
both enable_irq_window and enable_nmi_window.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 738262595706..622312176f28 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -5976,11 +5976,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) | |||
5976 | req_immediate_exit = true; | 5976 | req_immediate_exit = true; |
5977 | /* enable NMI/IRQ window open exits if needed */ | 5977 | /* enable NMI/IRQ window open exits if needed */ |
5978 | else if (vcpu->arch.nmi_pending) | 5978 | else if (vcpu->arch.nmi_pending) |
5979 | req_immediate_exit = | 5979 | kvm_x86_ops->enable_nmi_window(vcpu); |
5980 | kvm_x86_ops->enable_nmi_window(vcpu) != 0; | ||
5981 | else if (kvm_cpu_has_injectable_intr(vcpu) || req_int_win) | 5980 | else if (kvm_cpu_has_injectable_intr(vcpu) || req_int_win) |
5982 | req_immediate_exit = | 5981 | kvm_x86_ops->enable_irq_window(vcpu); |
5983 | kvm_x86_ops->enable_irq_window(vcpu) != 0; | ||
5984 | 5982 | ||
5985 | if (kvm_lapic_enabled(vcpu)) { | 5983 | if (kvm_lapic_enabled(vcpu)) { |
5986 | /* | 5984 | /* |