]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALID
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 23 Sep 2020 22:04:22 +0000 (15:04 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 28 Sep 2020 11:57:35 +0000 (07:57 -0400)
commitc9809274d94f6fa42df7c4988e412a21260c47b5
tree226793efa2e3fb6a48a62aa6e41de6ec8988611c
parent61b9f7079b309c570ba94b763d21b2454efe1765
KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALID

Exit to userspace with an error if the MMU is buggy and returns
RET_PF_INVALID when servicing a page fault.  This will allow a future
patch to invert the emulation path, i.e. emulate only on RET_PF_EMULATE
instead of emulating on anything but RET_PF_RETRY.  This technically
means that KVM will exit to userspace instead of emulating on
RET_PF_INVALID, but practically speaking it's a nop as the MMU never
returns RET_PF_INVALID.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200923220425.18402-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c