lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Aug 2021 19:00:31 +0800
From:   Yu Zhang <>
To:     Paolo Bonzini <>
Cc:     Sean Christopherson <>,
        Wei Huang <>,,,,,,,,,,,
Subject: Re: [PATCH v2 1/3] KVM: x86: Allow CPU to force vendor-specific TDP

On Tue, Aug 10, 2021 at 11:25:27AM +0200, Paolo Bonzini wrote:
> On 10/08/21 09:40, Yu Zhang wrote:
> > About "host can't easily mirror L1's desired paging mode", could you please elaborate?
> > Thanks!
> Shadow pgae tables in KVM will always have 3 levels on 32-bit machines and
> 4/5 levels on 64-bit machines.  L1 instead might have any number of levels
> from 2 to 5 (though of course not more than the host has).

Thanks Paolo.

I guess it's because, unlike EPT which are with either 4 or 5 levels, NPT's
level can range from 2 to 5, depending on the host paging mode...

> Therefore, when shadowing 32-bit NPT page tables, KVM has to add extra fixed
> levels on top of those that it's shadowing.  See mmu_alloc_direct_roots for
> the code.

So when shadowing NPTs(can be 2/3 levels, depending on the paging mode in L1),
and if L0 Linux is running in 4/5 level mode, extra levels of paging structures
is needed in the shadow NPT.

But shadow EPT does not have such annoyance. Is above understanding correct?


Powered by blists - more mailing lists