lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v13 005/113] KVM: TDX: Add placeholders for TDX VM/vcpu structure
Date
On Thu, 2023-03-16 at 08:41 -0700, Isaku Yamahata wrote:
> On Wed, Mar 15, 2023 at 10:42:09AM +0000,
> "Huang, Kai" <kai.huang@intel.com> wrote:
>
> > On Sun, 2023-03-12 at 10:55 -0700, isaku.yamahata@intel.com wrote:
> > > +
> > > +static inline bool is_td(struct kvm *kvm)
> > > +{
> > > + return kvm->arch.vm_type == KVM_X86_PROTECTED_VM;
> > > +}
> > > +
> >
> > KVM_X86_PROTECTED_VM is defined in the next patch, which means this patch cannot
> > compile.

Oh I see your patch only added this type to tools/.../asm/kvm.h

--- a/tools/arch/x86/include/uapi/asm/kvm.h
+++ b/tools/arch/x86/include/uapi/asm/kvm.h
@@ -559,4 +559,7 @@ struct kvm_pmu_event_filter {
#define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */
#define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */

+#define KVM_X86_DEFAULT_VM 0
+#define KVM_X86_PROTECTED_VM 1
+

So this one has already been in UPM series.

But I thought Sean had a comment saying we should not add such definition to
header file under tools/:

Even it needs to be added, it should be in the relevant patch in UPM series, but
not here.

> >
> > Also, why KVM_X86_PROTECTED_VM == TDX VM?
>
> This part needs to be resolved.
> Use KVM_X86_PROTECTED_VM as TDX VM or new type KVM_X86_TDX_VM or other way
> to specify VM type.
> Given pKVM is coming, dedicated VM type seems better. I'll switch it to
> KVM_X86_TDX_VM next respin.
> --
> Isaku Yamahata <isaku.yamahata@gmail.com>

I'll leave to Sean and Paolo.
\
 
 \ /
  Last update: 2023-03-27 01:04    [W:0.544 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site