The cr4_pae flag in the MMU role is misnamed and not handled correctly throughout the MMU code, i.e. it didn't evolve appropriately when TDP support was added. Rename the flag to gpte_size and fix its usage to ensure entries that are guaranteed to be 8-bytes set the flag regardless of the vCPU's PAE state. Patch 2/2 contains the actual change, patch 1/2 does a bit of cleanup in the shadow EPT role calculation to set the stage for (ab)using the legacy paging flags in the base role to denote a nested EPT shadow page. Sean Christopherson (2): KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT KVM: x86: fix handling of role.cr4_pae and rename it to 'gpte_size' Documentation/virtual/kvm/mmu.txt | 11 +++++---- arch/x86/include/asm/kvm_host.h | 4 ++-- arch/x86/kvm/mmu.c | 37 ++++++++++++++++++++++--------- arch/x86/kvm/mmutrace.h | 4 ++-- 4 files changed, 37 insertions(+), 19 deletions(-) -- 2.21.0