On Wed Nov 8, 2023 at 5:26 PM UTC, Sean Christopherson wrote: > On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > > With the upcoming introduction of per-VTL memory protections, make MMU > > roles VTL aware. This will avoid sharing PTEs between vCPUs that belong > > to different VTLs, and that have distinct memory access restrictions. > > > > Four bits are allocated to store the VTL number in the MMU role, since > > the TLFS states there is a maximum of 16 levels. > > How many does KVM actually allow/support? Multiplying the number of possible > roots by 16x is a *major* change. AFAIK in practice only VTL0/1 are used. Don't know if Microsoft will come up with more in the future. We could introduce a CAP that expses the number of supported VTLs to user-space, and leave it as a compile option.