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]
Message-ID: <9e7a89975e3aa69114a7e3325fd8e54d633749b1.camel@intel.com>
Date:   Thu, 16 Mar 2023 21:42:22 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>
CC:     "Christopherson,, Sean" <seanjc@...gle.com>,
        "Shahar, Sagi" <sagis@...gle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Aktas, Erdem" <erdemaktas@...gle.com>,
        "dmatlack@...gle.com" <dmatlack@...gle.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "zhi.wang.linux@...il.com" <zhi.wang.linux@...il.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "Yamahata, Isaku" <isaku.yamahata@...el.com>
Subject: Re: [PATCH v13 005/113] KVM: TDX: Add placeholders for TDX VM/vcpu
 structure

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@...el.com> wrote:
> 
> > On Sun, 2023-03-12 at 10:55 -0700, isaku.yamahata@...el.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@...il.com>

I'll leave to Sean and Paolo.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ