Currently, vmx_vcpu_run() resets 'nested_run_pending' irrespective of whether it is in guest mode. 'nested_run_pending' matters only to guest mode and hence reset it only in guest mode. Signed-off-by: Krish Sadhukhan <Krish.Sadhukhan@xxxxxxxxxx> --- arch/x86/kvm/vmx/vmx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index f2fd447eed45..af2be5930ba4 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6839,7 +6839,9 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) kvm_load_host_xsave_state(vcpu); - vmx->nested.nested_run_pending = 0; + if (is_guest_mode(vcpu)) + vmx->nested.nested_run_pending = 0; + vmx->idt_vectoring_info = 0; if (unlikely(vmx->fail)) { -- 2.27.0