]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - arch/x86/kvm/svm/svm.c
Revert "KVM: SVM: avoid infinite loop on NPF from bad address"
[mirror_ubuntu-jammy-kernel.git] / arch / x86 / kvm / svm / svm.c
index e64f16237b60ba646b836f252843c5fd5a8ad92e..f7e9cdee0d8d67da3b7e931543cb422cb17a0912 100644 (file)
@@ -4456,13 +4456,6 @@ static bool svm_can_emulate_instruction(struct kvm_vcpu *vcpu, void *insn, int i
        if (likely(!insn || insn_len))
                return true;
 
-       /*
-        * If RIP is invalid, go ahead with emulation which will cause an
-        * internal error exit.
-        */
-       if (!kvm_vcpu_gfn_to_memslot(vcpu, kvm_rip_read(vcpu) >> PAGE_SHIFT))
-               return true;
-
        cr4 = kvm_read_cr4(vcpu);
        smep = cr4 & X86_CR4_SMEP;
        smap = cr4 & X86_CR4_SMAP;