From: "Huang, Kai" <kai.huang@intel.com>
To: "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>
Cc: "Hansen, Dave" <dave.hansen@intel.com>, "Christopherson,,
Sean" <seanjc@google.com>, "x86@kernel.org" <x86@kernel.org>,
"bp@alien8.de" <bp@alien8.de>,
"peterz@infradead.org" <peterz@infradead.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"Yamahata, Isaku" <isaku.yamahata@intel.com>,
"sathyanarayanan.kuppuswamy@linux.intel.com"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"n.borisov.lkml@gmail.com" <n.borisov.lkml@gmail.com>
Subject: Re: [PATCH v4 12/12] x86/virt/tdx: Adjust 'struct tdx_module_args' to use x86 "register index" layout
Date: Sat, 26 Aug 2023 00:45:27 +0000 [thread overview]
Message-ID: <c7ce1d6e1f83ddb3c0af5607563bc26056df7fe3.camel@intel.com> (raw)
In-Reply-To: <20230825234432.3ynoxtlguhqj4axl@box>
On Sat, 2023-08-26 at 02:44 +0300, kirill.shutemov@linux.intel.com wrote:
> On Tue, Aug 15, 2023 at 11:02:06PM +1200, Kai Huang wrote:
> > diff --git a/arch/x86/include/asm/shared/tdx.h b/arch/x86/include/asm/shared/tdx.h
> > index 74fc466dfdcd..8d1427562c63 100644
> > --- a/arch/x86/include/asm/shared/tdx.h
> > +++ b/arch/x86/include/asm/shared/tdx.h
> > @@ -58,24 +58,31 @@
> > * Used in __tdcall*() to gather the input/output registers' values of the
> > * TDCALL instruction when requesting services from the TDX module. This is a
> > * software only structure and not part of the TDX module/VMM ABI
> > + *
> > + * Note those *_unused are not used by the TDX_MODULE_CALL assembly.
> > + * The layout of this structure also matches KVM's kvm_vcpu_arch::regs[]
> > + * layout, which follows the "register index" order of x86 GPRs. KVM
> > + * then can simply type cast kvm_vcpu_arch::regs[] to this structure to
> > + * avoid the extra memory copy between two structures when making
> > + * TDH.VP.ENTER SEAMCALL.
>
> I still don't like KVM details leak here. I don't feel strong enough about
> it to NAK the patch, but...
>
I am fine dropping it. It's an optimization anyway.
I'll leave to Peter. :-)
next prev parent reply other threads:[~2023-08-26 0:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 11:01 [PATCH v4 00/12] Unify TDCALL/SEAMCALL and TDVMCALL assembly Kai Huang
2023-08-15 11:01 ` [PATCH v4 01/12] x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro Kai Huang
2023-08-15 11:01 ` [PATCH v4 02/12] x86/tdx: Skip saving output regs when SEAMCALL fails with VMFailInvalid Kai Huang
2023-08-25 23:25 ` kirill.shutemov
2023-08-15 11:01 ` [PATCH v4 03/12] x86/tdx: Make macros of TDCALLs consistent with the spec Kai Huang
2023-08-15 11:01 ` [PATCH v4 04/12] x86/tdx: Rename __tdx_module_call() to __tdcall() Kai Huang
2023-08-15 11:01 ` [PATCH v4 05/12] x86/tdx: Pass TDCALL/SEAMCALL input/output registers via a structure Kai Huang
2023-08-25 23:28 ` kirill.shutemov
2023-08-15 11:02 ` [PATCH v4 06/12] x86/tdx: Extend TDX_MODULE_CALL to support more TDCALL/SEAMCALL leafs Kai Huang
2023-08-25 23:36 ` kirill.shutemov
2023-08-26 0:52 ` Huang, Kai
2023-08-15 11:02 ` [PATCH v4 07/12] x86/tdx: Make TDX_HYPERCALL asm similar to TDX_MODULE_CALL Kai Huang
2023-08-25 23:35 ` kirill.shutemov
2023-08-26 0:50 ` Huang, Kai
2023-08-26 4:59 ` Huang, Kai
2023-08-30 13:10 ` kirill.shutemov
2023-08-30 22:20 ` Huang, Kai
2023-08-15 11:02 ` [PATCH v4 08/12] x86/tdx: Reimplement __tdx_hypercall() using TDX_MODULE_CALL asm Kai Huang
2023-08-15 11:02 ` [PATCH v4 09/12] x86/tdx: Remove 'struct tdx_hypercall_args' Kai Huang
2023-08-15 11:02 ` [PATCH v4 10/12] x86/virt/tdx: Wire up basic SEAMCALL functions Kai Huang
2023-08-15 11:02 ` [PATCH v4 11/12] x86/virt/tdx: Make TDX_MODULE_CALL handle SEAMCALL #UD and #GP Kai Huang
2023-08-25 23:41 ` kirill.shutemov
2023-08-15 11:02 ` [PATCH v4 12/12] x86/virt/tdx: Adjust 'struct tdx_module_args' to use x86 "register index" layout Kai Huang
2023-08-25 23:44 ` kirill.shutemov
2023-08-26 0:45 ` Huang, Kai [this message]
2023-09-05 23:01 ` [PATCH v4 00/12] Unify TDCALL/SEAMCALL and TDVMCALL assembly Huang, Kai
2023-09-06 11:57 ` Peter Zijlstra
2023-09-06 12:21 ` Huang, Kai
2023-09-14 0:22 ` Isaku Yamahata
2023-09-14 0:45 ` Huang, Kai
2023-09-11 17:08 ` Paolo Bonzini
2023-09-11 22:29 ` Huang, Kai
2023-09-12 0:57 ` Huang, Kai
2023-09-12 13:37 ` Paolo Bonzini
2023-09-14 0:23 ` Isaku Yamahata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c7ce1d6e1f83ddb3c0af5607563bc26056df7fe3.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=isaku.yamahata@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=n.borisov.lkml@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®