aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorYan Zhao <[email protected]>2025-03-18 01:31:11 +0000
committerSean Christopherson <[email protected]>2025-04-28 18:03:06 +0000
commitea9fcdf76d3d1d659fb3daaa0cca7b1f4a0697bc (patch)
tree1bd069691be1269e4194440be2391075208ee517 /rust/helpers/mutex.c
parentMerge branch 'kvm-fixes-6.15-rc4' into HEAD (diff)
downloadkernel-ea9fcdf76d3d1d659fb3daaa0cca7b1f4a0697bc.tar.gz
kernel-ea9fcdf76d3d1d659fb3daaa0cca7b1f4a0697bc.zip
KVM: x86/mmu: Further check old SPTE is leaf for spurious prefetch fault
Instead of simply treating a prefetch fault as spurious when there's a shadow-present old SPTE, further check if the old SPTE is leaf to determine if a prefetch fault is spurious. It's not reasonable to treat a prefetch fault as spurious when there's a shadow-present non-leaf SPTE without a corresponding shadow-present leaf SPTE. e.g., in the following sequence, a prefetch fault should not be considered spurious: 1. add a memslot with size 4K 2. prefault GPA A in the memslot 3. delete the memslot (zap all disabled) 4. re-add the memslot with size 2M 5. prefault GPA A again. In step 5, the prefetch fault attempts to install a 2M huge entry. Since step 3 zaps the leaf SPTE for GPA A while keeping the non-leaf SPTE, the leaf entry will remain empty after step 5 if the fetch fault is regarded as spurious due to a shadow-present non-leaf SPTE. Signed-off-by: Yan Zhao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions