summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2026-04-27 11:30:56 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2026-05-10 14:55:08 +0200
commitec65797ce341e26563a9cb25943035bd2431a6c8 (patch)
tree6fd7817e370d08ca1d346fa873867ea7549a0ac4 /tools/lib/python/kdoc
parent7658b9343a8f65e5fe742301a083db1018320c1d (diff)
KVM: x86/mmu: hard code more bits in kvm_init_shadow_npt_mmu
The host CR0 does not really reflect onto the NPT format because hCR0.PG=1 must be set and hCR0.WP is ignored. Carve that in stone by removing the cr0 argument from kvm_init_shadow_npt_mmu. Pass in WP=1 as well; it does not matter for GMET disabled because PFERR_USER_MASK is always set, but a cleared W bit in the nested page tables cannot be overridden in supervisor mode when GMET is enabled, either. In fact, since CR0.WP=0 is the weird "extra accesses allowed" mode, it is acutally easier think about it being always set. Likewise, clear X86_CR4_SMAP to avoid that KVM erroneously faults on supervisor accesses to an U=1 page. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions