lkml.org 
[lkml]   [2023]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] KVM: SVM: Disable TDP MMU when running on Hyper-V
On Thu, Apr 13, 2023 at 12:10 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Thu, Apr 13, 2023, Sean Christopherson wrote:
> > Aha! Idea. There are _at most_ 4 possible roots the TDP MMU can encounter.
> > 4-level non-SMM, 4-level SMM, 5-level non-SMM, and 5-level SMM. I.e. not keeping
> > inactive roots on a per-VM basis is just monumentally stupid.
>
> One correction: there are 6 possible roots:
>
> 1. 4-level !SMM !guest_mode (i.e. not nested)
> 2. 4-level SMM !guest_mode
> 3. 5-level !SMM !guest_mode
> 4. 5-level SMM !guest_mode
> 5. 4-level !SMM guest_mode
> 6. 5-level !SMM guest_mode
>
> I forgot that KVM still uses the TDP MMU when running L2 if L1 doesn't enable
> EPT/TDP, i.e. if L1 is using shadow paging for L2. But that really doesn't change
> anything as each vCPU can already track 4 roots, i.e. userspace can saturate all
> 6 roots anyways. And in practice, no sane VMM will create a VM with both 4-level
> and 5-level roots (KVM keys off of guest.MAXPHYADDR for the TDP root level).

Why do we create a new root for guest_mode=1 if L1 disables EPT/NPT?

\
 
 \ /
  Last update: 2023-04-13 22:22    [W:0.068 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site