[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <876132ef9ab580a30b6799841f4606098eda92a0.camel@intel.com>
Date: Thu, 3 Aug 2023 22:41:37 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
CC: "Hansen, Dave" <dave.hansen@...el.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"x86@...nel.org" <x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
"peterz@...radead.org" <peterz@...radead.org>,
"hpa@...or.com" <hpa@...or.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"n.borisov.lkml@...il.com" <n.borisov.lkml@...il.com>
Subject: Re: [PATCH v3 07/12] x86/tdx: Make TDX_HYPERCALL asm similar to
TDX_MODULE_CALL
On Thu, 2023-08-03 at 16:47 +0300, kirill.shutemov@...ux.intel.com wrote:
> On Thu, Aug 03, 2023 at 12:41:25PM +0000, Huang, Kai wrote:
> > On Thu, 2023-08-03 at 15:12 +0300, kirill.shutemov@...ux.intel.com wrote:
> > > On Thu, Aug 03, 2023 at 11:56:40AM +0000, Huang, Kai wrote:
> > > > On Thu, 2023-08-03 at 14:45 +0300, kirill.shutemov@...ux.intel.com wrote:
> > > > > > > I would rather keep the struct
> > > > > > > read-only where possible.
> > > > > > >
> > > > > >
> > > > > > We can achieve this if there's a clean way to do, but I don't see that.
> > > > >
> > > > > Keep _ret() and non-_ret() versions?
> > > >
> > > > The problem is the assembly needs to always turn on the "\ret" so that the R10
> > > > (used as VP.VMCALL leaf return code) can be saved to the structure. Otherwise
> > > > we are not able to return VP.VMCALL leaf return code.
> > >
> > > Yeah. This is downside of single assembly macro for all calls.
> > >
> > > One possible way is to make it in C: non-_ret() version pass to the
> > > assembly helper copy of the caller's struct, keeping original intact.
> > > But, yeah, it is ugly.
> > >
> >
> > You sure you want to do this? :-)
>
> No, I am not.
>
> Maybe somebody else has better ideas.
>
Anyway thanks for feedback. So I don't see there's any real problem with this
patch, thus I will just keep the current way.
Powered by blists - more mailing lists