]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Drop exec/NX check from "page fault can be fast"
authorSean Christopherson <seanjc@google.com>
Sat, 23 Apr 2022 03:47:45 +0000 (03:47 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 May 2022 13:51:41 +0000 (09:51 -0400)
commit6e0f5c2b3f71e85bb509c5efd5df4e4e9bb34b67
treec007219802a412883eb51974198d4dd63d6c6b8c
parent8b53e33ab0f23d50eac292360037636c4cc87824
KVM: x86/mmu: Drop exec/NX check from "page fault can be fast"

Tweak the "page fault can be fast" logic to explicitly check for !PRESENT
faults in the access tracking case, and drop the exec/NX check that
becomes redundant as a result.  No sane hardware will generate an access
that is both an instruct fetch and a write, i.e. it's a waste of cycles.
If hardware goes off the rails, or KVM runs under a misguided hypervisor,
spuriously running throught fast path is benign (KVM has been uknowingly
being doing exactly that for years).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220423034752.1161007-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c