Commit c1edcc4
committed
KVM: x86: Retry to-be-emulated insn in "slow" unprotect path iff sp is zapped
Resume the guest and thus skip emulation of a non-PTE-writing instruction
if and only if unprotecting the gfn actually zapped at least one shadow
page. If the gfn is write-protected for some reason other than shadow
paging, attempting to unprotect the gfn will effectively fail, and thus
retrying the instruction is all but guaranteed to be pointless. This bug
has existed for a long time, but was effectively fudged around by the
retry RIP+address anti-loop detection.
Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Link: https://lore.kernel.org/r/20240831001538.336683-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 2fb2b78 commit c1edcc4
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8965 | 8965 | | |
8966 | 8966 | | |
8967 | 8967 | | |
8968 | | - | |
8969 | | - | |
8970 | | - | |
8971 | 8968 | | |
8972 | 8969 | | |
8973 | 8970 | | |
8974 | | - | |
| 8971 | + | |
| 8972 | + | |
8975 | 8973 | | |
| 8974 | + | |
| 8975 | + | |
8976 | 8976 | | |
8977 | 8977 | | |
8978 | 8978 | | |
| |||
0 commit comments