[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8dIgEhj1Zb1688t@google.com>
Date: Wed, 18 Jan 2023 01:16:48 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: "Huang, Kai" <kai.huang@...el.com>
Cc: "dmatlack@...gle.com" <dmatlack@...gle.com>,
"Shahar, Sagi" <sagis@...gle.com>,
"chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
"isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
"Aktas, Erdem" <erdemaktas@...gle.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v11 025/113] KVM: TDX: Use private memory for TDX
On Tue, Jan 17, 2023, Huang, Kai wrote:
> On Tue, 2023-01-17 at 16:40 +0000, Sean Christopherson wrote:
> > On Mon, Jan 16, 2023, Huang, Kai wrote:
> > > AMD's series has a different solution:
> > >
> > > https://lore.kernel.org/lkml/20221214194056.161492-3-michael.roth@amd.com/
> > >
> > > I think somehow this needs to get aligned.
> >
> > Ya. My thought is
> >
> > bool kvm_arch_has_private_mem(struct kvm *kvm)
> > {
> > return kvm->arch.vm_type != KVM_X86_DEFAULT_VM;
> > }
> >
> > where the VM types end up being:
> >
> > #define KVM_X86_DEFAULT_VM 0
> > #define KVM_X86_PROTECTED_VM 1
> > #define KVM_X86_TDX_VM 2
> > #define KVM_X86_SNP_VM 3
>
> What's the difference between PROTECTED_VM vs TDX_VM/SNP_VM, may I ask?
Not sure :-)
At this point, PROTECTED_VM is a handwavy "guest that can access restricted memory".
I think/hope it can be used in combination with existing SEV/SEV-ES APIs to allow
backing such guests with restrictedmem.
As for TDX_VM and SNP_VM, I'm speculating that KVM will need to differentiate between
SNP, TDX, and everything else. E.g. if KVM needs to uniquely identify TDX VMs at
creation time, then adding dedicated VM types seems like the obvious choice. Ditto
for SNP VMs.
That's partly why I want to smush everything together, to see if we actually need
multiple VM types.
Powered by blists - more mailing lists