Re: [RFC PATCH 00/22] KVM: combined patchset for MBEC/GMET support
From: Paolo Bonzini
Date: Sat Mar 21 2026 - 09:54:40 EST
On Sat, Mar 21, 2026 at 1:09 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> On the AMD side [...] the page tables have to be created with U=0. For now I chose to have it in all levels of the page tables; I'll probably change the code soon to clear the U bit only in leaf SPTEs, but I'm leaving it this way because it makes patch 16 easier to understand (it's a fix for a latent bug of sorts and I'd like to include it anyway).
I added this as the last thing before sending and it's wrong - the
*role* needs to have ACC_USER_MASK cleared at all levels, which is
what patch 16 does (propagating down from the root role). The SPTEs
however only have U=0 in the leaf; make_nonleaf_spte() leaves the bit
set which is the right thing to do.
Paolo