summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/cpuid.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-05-03 07:23:08 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-03 07:23:08 -0400
commit4f510c8bb1dd0edc5f8f82cbe990c6174ceb5a06 (patch)
tree978126728b3e43c9639a1b305be872d3a6567756 /arch/x86/kvm/cpuid.c
parentf751d8eac17692905cdd6935f72d523d8adf3b65 (diff)
parentba3a6120a4e7efc13d19fe43eb6c5caf1da05b72 (diff)
downloadlinux-4f510c8bb1dd0edc5f8f82cbe990c6174ceb5a06.tar.gz
linux-4f510c8bb1dd0edc5f8f82cbe990c6174ceb5a06.tar.bz2
linux-4f510c8bb1dd0edc5f8f82cbe990c6174ceb5a06.zip
Merge branch 'kvm-tdp-mmu-atomicity-fix' into HEAD
We are dropping A/D bits (and W bits) in the TDP MMU. Even if mmu_lock is held for write, as volatile SPTEs can be written by other tasks/vCPUs outside of mmu_lock. Attempting to prove that bug exposed another notable goof, which has been lurking for a decade, give or take: KVM treats _all_ MMU-writable SPTEs as volatile, even though KVM never clears WRITABLE outside of MMU lock. As a result, the legacy MMU (and the TDP MMU if not fixed) uses XCHG to update writable SPTEs. The fix does not seem to have an easily-measurable affect on performance; page faults are so slow that wasting even a few hundred cycles is dwarfed by the base cost.
Diffstat (limited to 'arch/x86/kvm/cpuid.c')
0 files changed, 0 insertions, 0 deletions