summaryrefslogtreecommitdiff
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-08-30 17:15:18 -0700
committerSean Christopherson <seanjc@google.com>2024-09-09 20:16:19 -0700
commit989a84c93f592e6b288fb3b96d2eeec827d75bef (patch)
tree5b70101ff94c85be5cdc778ca31ff7eb93b66fb9 /block/blk-lib.c
parent4ececec19a0914873634ad69bbaca5557c33e855 (diff)
KVM: x86/mmu: Trigger unprotect logic only on write-protection page faults
Trigger KVM's various "unprotect gfn" paths if and only if the page fault was a write to a write-protected gfn. To do so, add a new page fault return code, RET_PF_WRITE_PROTECTED, to explicitly and precisely track such page faults. If a page fault requires emulation for any MMIO (or any reason besides write-protection), trying to unprotect the gfn is pointless and risks putting the vCPU into an infinite loop. E.g. KVM will put the vCPU into an infinite loop if the vCPU manages to trigger MMIO on a page table walk. Fixes: 147277540bbc ("kvm: svm: Add support for additional SVM NPF error codes") Reviewed-by: Yuan Yao <yuan.yao@intel.com> Link: https://lore.kernel.org/r/20240831001538.336683-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'block/blk-lib.c')
0 files changed, 0 insertions, 0 deletions