[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgPwwI2+16/7jQC4@google.com>
Date: Wed, 9 Feb 2022 16:50:08 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Kai Huang <kai.huang@...el.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
tglx@...utronix.de, mingo@...hat.com, dave.hansen@...el.com,
luto@...nel.org, peterz@...radead.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
joro@...tes.org, jpoimboe@...hat.com, knsathya@...nel.org,
pbonzini@...hat.com, sdeep@...are.com, tony.luck@...el.com,
vkuznets@...hat.com, wanpengli@...cent.com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 00/29] TDX Guest: TDX core support
On Wed, Feb 09, 2022, Borislav Petkov wrote:
> On Thu, Feb 10, 2022 at 12:48:31AM +1300, Kai Huang wrote:
> > Are you suggesting even for now we can start to put TDX host support to
> > arch/x86/coco/tdx/ ?
>
> That's exactly what I'm suggesting. The TDX stuff is not upstream so
> nothing's cast in stone yet. This way there won't be any unpleasant code
> movements later.
I strongly prefer we put the guest and host code in separate directories. Both
TDX and SEV are big enough that they'll benefit from splitting up files, having
to fight over file names or tag all files with guest/host will get annoying.
I do like the idea of arch/x86/coco though. The most straightforward approach
would be:
arch/x86/coco/guest/
arch/x86/coco/host/
but that doesn't provide any extensibility on the host virtualization side, e.g.
to land non-coco, non-KVM-specific host virtualization code (we have a potential
use case for this). If that happens, we'd end up with x86 KVM having code and
dependencies split across:
arch/x86/coco/host
arch/x86/kvm/
arch/x86/???/
An alternative idea would be to mirror what generic KVM does (virt/kvm/), and do:
arch/x86/coco/<guest stuff>
arch/x86/virt/<"generic" x86 host virtualization stuff>
arch/x86/virt/coco/<host coco stuff>
arch/x86/virt/kvm/
Though I can already hear the stable trees and downstream kernels crying out in
horror at moving arch/x86/kvm :-)
Powered by blists - more mailing lists