Commit 6205257
committed
KVM: x86: Remove manual pfn lookup when retrying #PF after failed emulation
Drop the manual pfn look when retrying an instruction that KVM failed to
emulation in response to a #PF due to a write-protected gfn. Now that KVM
sets EMULTYPE_ALLOW_RETRY_PF if and only if the page fault hit a write-
protected gfn, i.e. if and only if there's a writable memslot, there's no
need to redo the lookup to avoid retrying an instruction that failed on
emulated MMIO (no slot, or a write to a read-only slot).
I.e. KVM will never attempt to retry an instruction that failed on
emulated MMIO, whereas that was not the case prior to the introduction of
RET_PF_WRITE_PROTECTED.
Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Link: https://lore.kernel.org/r/20240831001538.336683-16-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent b299c27 commit 6205257
1 file changed
Lines changed: 0 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8865 | 8865 | | |
8866 | 8866 | | |
8867 | 8867 | | |
8868 | | - | |
8869 | 8868 | | |
8870 | 8869 | | |
8871 | 8870 | | |
| |||
8885 | 8884 | | |
8886 | 8885 | | |
8887 | 8886 | | |
8888 | | - | |
8889 | | - | |
8890 | | - | |
8891 | | - | |
8892 | | - | |
8893 | | - | |
8894 | | - | |
8895 | | - | |
8896 | | - | |
8897 | | - | |
8898 | | - | |
8899 | | - | |
8900 | | - | |
8901 | | - | |
8902 | | - | |
8903 | | - | |
8904 | | - | |
8905 | 8887 | | |
8906 | 8888 | | |
8907 | 8889 | | |
| |||
0 commit comments