KVM: x86/mmu: store shadow EFER.NX in the MMU role
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 12:33:38 +0000 (07:33 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:55 +0000 (12:49 -0400)
commit362505deb8e2ce27993a1dee0b3c5755d4d6646e
tree24d7ab5693d56ec0e5ba33f7ac869e2cbaf6aadf
parentf417e1459a1299bb4984cbffc03d8746cab9f8a8
KVM: x86/mmu: store shadow EFER.NX in the MMU role

Now that the MMU role is separate from the CPU role, it can be a
truthful description of the format of the shadow pages.  This includes
whether the shadow pages use the NX bit; so force the efer_nx field
of the MMU role when TDP is disabled, and remove the hardcoding it in
the callers of reset_shadow_zero_bits_mask.

In fact, the initialization of reserved SPTE bits can now be made common
to shadow paging and shadow NPT; move it to shadow_mmu_init_context.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c