diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 05ca303d7fd98964456822991b6be24975ee6baf..68827b8dc37a5d1cfc6b3d15928a8dbc1df0c6c2 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8860,7 +8860,9 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, write_fault_to_spt, emulation_type)) return 1; - if (ctxt->have_exception) { + + if (ctxt->have_exception && + !(emulation_type & EMULTYPE_SKIP)) { /* * #UD should result in just EMULATION_FAILED, and trap-like * exception should not be encountered during decode.