linux/arch/x86/kvm/mmu
David Matlack 5f16bcac6e KVM: x86/mmu: Document and enforce MMU-writable and Host-writable invariants
SPTEs are tagged with software-only bits to indicate if it is
"MMU-writable" and "Host-writable". These bits are used to determine why
KVM has marked an SPTE as read-only.

Document these bits and their invariants, and enforce the invariants
with new WARNs in spte_can_locklessly_be_made_writable() to ensure they
are not accidentally violated in the future.

Opportunistically move DEFAULT_SPTE_{MMU,HOST}_WRITABLE next to
EPT_SPTE_{MMU,HOST}_WRITABLE since the new documentation applies to
both.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220113233020.3986005-4-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-19 12:07:06 -05:00
..
mmu_audit.c KVM: x86/mmu: Rename __gfn_to_rmap to gfn_to_rmap 2021-08-06 07:52:58 -04:00
mmu_internal.h KVM: x86/mmu: Propagate memslot const qualifier 2021-12-08 04:24:43 -05:00
mmu.c Merge remote-tracking branch 'kvm/master' into HEAD 2021-12-21 12:51:09 -05:00
mmutrace.h KVM: X86: Rename gpte_is_8_bytes to has_4_byte_gpte and invert the direction 2021-12-08 04:25:13 -05:00
page_track.c KVM: x86/mmu: Propagate memslot const qualifier 2021-12-08 04:24:43 -05:00
paging_tmpl.h KVM: X86: Remove mmu->translate_gpa 2021-12-08 04:25:11 -05:00
paging.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-14 12:17:56 -04:00
spte.c KVM: x86/mmu: Clear MMU-writable during changed_pte notifier 2022-01-19 12:06:45 -05:00
spte.h KVM: x86/mmu: Document and enforce MMU-writable and Host-writable invariants 2022-01-19 12:07:06 -05:00
tdp_iter.c KVM: x86/mmu: Don't advance iterator after restart due to yielding 2021-12-20 08:06:53 -05:00
tdp_iter.h KVM: x86/mmu: Don't advance iterator after restart due to yielding 2021-12-20 08:06:53 -05:00
tdp_mmu.c KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU 2022-01-19 12:06:26 -05:00
tdp_mmu.h KVM: x86/mmu: Remove spurious TLB flushes in TDP MMU zap collapsible path 2021-11-30 03:09:25 -05:00