Paolo Bonzini 4f510c8bb1 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.
2022-05-03 07:23:08 -04:00
..
2022-03-26 12:19:04 -07:00
2022-03-31 11:59:03 -07:00
2022-01-16 15:53:00 +02:00
2021-11-01 21:17:39 -07:00
2022-04-03 12:15:47 -07:00
2022-04-07 11:27:02 +02:00
2022-03-28 14:32:39 -07:00
2021-12-11 09:09:45 +01:00