lists.openwall.net   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  linux-cve-announce  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, 19 Jul 2022 03:26:14 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Kai Huang <kai.huang@...el.com>
Cc:     isaku.yamahata@...el.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH v7 039/102] KVM: x86/mmu: Allow per-VM override of the
 TDP max page level

On Fri, Jul 01, 2022 at 12:27:24AM +1200,
Kai Huang <kai.huang@...el.com> wrote:

> On Mon, 2022-06-27 at 14:53 -0700, isaku.yamahata@...el.com wrote:
> > From: Sean Christopherson <sean.j.christopherson@...el.com>
> > 
> > TODO: This is a transient workaround patch until the large page support for
> > TDX is implemented.  Support large page for TDX and remove this patch.
> 
> I don't understand.  How does this patch have anything to do with what you are
> talking about here?
> 
> If you want to remove this patch later, then why not just explain the reason to
> remove when you actually have that patch?
> 
> > 
> > At this point, large page for TDX isn't supported, and need to allow guest
> > TD to work only with 4K pages.  On the other hand, conventional VMX VMs
> > should continue to work with large page.  Allow per-VM override of the TDP
> > max page level.
> 
> At which point/previous patch have you made/declared "large page for TDX isn't
> supported"?
> 
> If you want to declare you don't want to support large page for TDX, IMHO just
> declare it here, for instance:
> 
> "For simplicity, only support 4K page for TD guest."
>   
> > 
> > In the existing x86 KVM MMU code, there is already max_level member in
> > struct kvm_page_fault with KVM_MAX_HUGEPAGE_LEVEL initial value.  The KVM
> > page fault handler denies page size larger than max_level.
> > 
> > Add per-VM member to indicate the allowed maximum page size with
> > KVM_MAX_HUGEPAGE_LEVEL as default value and initialize max_level in struct
> > kvm_page_fault with it.  For the guest TD, the set per-VM value for allows
> > maximum page size to 4K page size.  Then only allowed page size is 4K.  It
> > means large page is disabled.
> 
> To me it's overcomplicated.  You just need simple sentences for such simple
> infrastructural patch.  For instance:
> 
> "TDX requires special handling to support large private page.  For simplicity,
> only support 4K page for TD guest for now.  Add per-VM maximum page level
> support to support different maximum page sizes for TD guest and conventional
> VMX guest."
> 
> Just for your reference.

Thanks for the sentences. I'll replace the commit message with yours.

-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ