Re: [PATCH V3 11/12] KVM: X86/MMU: Don't use mmu->pae_root when shadowing PAE NPT in 64-bit host

From: Sean Christopherson
Date: Tue Jul 19 2022 - 19:27:41 EST


On Tue, Jul 19, 2022, Sean Christopherson wrote:
> On Sat, May 21, 2022, Lai Jiangshan wrote:
> Actually, I think the series is buggy. That patch, which precedes this one, does
>
> if (vcpu->arch.mmu->root_role.level != PT32E_ROOT_LEVEL)
> return 0;
>
> i.e. does NOT allocate pae_root for a 64-bit host, which means that running KVM
> against the on-demand patch would result in the WARN firing and bad things happening.

Gah, I take that back, pae_root is allocated by mmu_alloc_special_roots().