diff options
author | Sean Christopherson <seanjc@google.com> | 2024-02-03 03:23:41 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-23 03:19:06 +0300 |
commit | 515c18a64e704bc932c5a64e25aaeb712252cf0b (patch) | |
tree | da833eee797ac7e10bb06518a61d289caba1e7c3 /lib/memory-notifier-error-inject.c | |
parent | 474b99ed703b7e4031f3925adacf19e7c8af2075 (diff) | |
download | linux-515c18a64e704bc932c5a64e25aaeb712252cf0b.tar.xz |
KVM: x86: Drop dedicated logic for direct MMUs in reexecute_instruction()
Now that KVM doesn't pointlessly acquire mmu_lock for direct MMUs, drop
the dedicated path entirely and always query indirect_shadow_pages when
deciding whether or not to try unprotecting the gfn. For indirect, a.k.a.
shadow MMUs, checking indirect_shadow_pages is harmless; unless *every*
shadow page was somehow zapped while KVM was attempting to emulate the
instruction, indirect_shadow_pages is guaranteed to be non-zero.
Well, unless the instruction used a direct hugepage with 2-level paging
for its code page, but in that case, there's obviously nothing to
unprotect. And in the extremely unlikely case all shadow pages were
zapped, there's again obviously nothing to unprotect.
Link: https://lore.kernel.org/r/20240203002343.383056-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions