Revert a recent change to return RET_PF_EMULATE instead of -EFAULT when handling an invalid HVA during a page fault, and resolve the original bug by removing a bogus WARN_ON in handle_ept_misconfig. I came across the new behavior of RET_PF_EMULATE while testing failure scenarios related to handling faults on remapped PFNs, e.g. VMAs with VM_PFNMAP set. In one scenario I wanted to confirm KVM behavior when my fault handler (associated with the VMA) could not insert a PFN, e.g. due to unresolvable resource contention. Rather than the expected -EFAULT (or similar death), Qemu spat out an emulation failure, which led me down this rabbit hole... I tried a variety of alternative approaches to fixing the original bug, e.g. returning RET_PF_EMULATE only for MMIO or adding a new return type, but eventually I came to the conclusion that the handle_ept_misconfig() behavior is simply wrong. There's (a lot) more analysis in the revert commit. Sean Christopherson (2): Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown" KVM: VMX: remove bogus WARN_ON in handle_ept_misconfig arch/x86/kvm/mmu.c | 2 +- arch/x86/kvm/vmx.c | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) -- 2.16.2