KVM: VMX: Fix locking order in handle_invalid_guest_state

Release and re-acquire preemption and IRQ lock in the same order as
vcpu_enter_guest does.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

authored by Jan Kiszka and committed by Avi Kivity 34f0c1ad 025dbbf3

+2 -2
+2 -2
arch/x86/kvm/vmx.c
··· 3157 3157 struct vcpu_vmx *vmx = to_vmx(vcpu); 3158 3158 enum emulation_result err = EMULATE_DONE; 3159 3159 3160 - preempt_enable(); 3161 3160 local_irq_enable(); 3161 + preempt_enable(); 3162 3162 3163 3163 while (!guest_state_valid(vcpu)) { 3164 3164 err = emulate_instruction(vcpu, kvm_run, 0, 0, 0); ··· 3177 3177 schedule(); 3178 3178 } 3179 3179 3180 - local_irq_disable(); 3181 3180 preempt_disable(); 3181 + local_irq_disable(); 3182 3182 3183 3183 vmx->invalid_state_emulation_result = err; 3184 3184 }