KVM: VMX: Fix locking imbalance on emulation failure
PATCH 1/1 KVM: VMX: Fix locking imbalance on emulation failure
We have to disable preemption and IRQs on every exit from handle_invalid_guest_state, otherwise we generate at least a preempt_disable imbalance.
Signed-off-by Jan Kiszka <[email protected]>
---
arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/vmx.c +1 -1
@@ -3335,7 +3335,7 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,if (err !=EMULATE_DONE ) {kvm_report_emulation_failure (vcpu,"emulation failure" ); -return ; +break ; }if (signal_pending (current))
Marcelo Tosatti
AppliedQuoted 15 lines · Jan Kiszka
We have to disable preemption and IRQs on every exit from
handle_invalid_guest_state, otherwise we generate at least apreempt_disableimbalance.Signed-off-by Jan Kiszka <[email protected]>---
arch/x86/kvm/vmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/vmx.c +0
-0
arch/x86/kvm/vmx.c static void handle_invalid_guest_state(struct kvm_vcpu *vcpu, · line 3341
Quoted 8 lines
arch/x86/kvm/vmx.c +1
-1@@ -3335,7 +3335,7 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,if (err !=EMULATE_DONE ) {kvm_report_emulation_failure (vcpu,"emulation failure" ); -return ; +break ; }if (signal_pending (current))
Applied, thanks.