]> git.itanic.dy.fi Git - linux-stable/commit
KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 7 Mar 2019 23:27:43 +0000 (15:27 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:21:20 +0000 (09:21 +0200)
commit5369433777ecc0330e60eb5b7f0b2d92361d63b0
tree4c3a8faa328acb3591f2b52e7501833634aaf70d
parente8b8dde69f819253e7a6cd83a834618f166a52b7
KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT

[ Upstream commit 552c69b1dc714854a5f4e27d37a43c6d797adf7d ]

Explicitly zero out quadrant and invalid instead of inheriting them from
the root_mmu.  Functionally, this patch is a nop as we (should) never
set quadrant for a direct mapped (EPT) root_mmu and nested EPT is only
allowed if EPT is used for L1, and the root_mmu will never be invalid at
this point.

Explicitly setting flags sets the stage for repurposing the legacy
paging bits in role, e.g. nxe, cr0_wp, and sm{a,e}p_andnot_wp, at which
point 'smm' would be the only flag to be inherited from root_mmu.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
arch/x86/kvm/mmu.c