[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SA1PR21MB1335A994B0EAD226CF2D15FEBF1CA@SA1PR21MB1335.namprd21.prod.outlook.com>
Date: Wed, 23 Aug 2023 17:40:15 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Tianyu Lan <ltykernel@...il.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"arnd@...db.de" <arnd@...db.de>, "bp@...en8.de" <bp@...en8.de>,
"brijesh.singh@....com" <brijesh.singh@....com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"dave.hansen@...el.com" <dave.hansen@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"hpa@...or.com" <hpa@...or.com>,
"jane.chu@...cle.com" <jane.chu@...cle.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
KY Srinivasan <kys@...rosoft.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"luto@...nel.org" <luto@...nel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>, jason <jason@...c4.com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>,
"Michael Kelley (LINUX)" <mikelley@...rosoft.com>
CC: "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>,
"rick.p.edgecombe@...el.com" <rick.p.edgecombe@...el.com>,
Anthony Davis <andavis@...hat.com>,
Mark Heslin <mheslin@...hat.com>,
vkuznets <vkuznets@...hat.com>,
"xiaoyao.li@...el.com" <xiaoyao.li@...el.com>
Subject: RE: [PATCH 2/9] x86/hyperv: Support hypercalls for fully enlightened
TDX guests
> From: Tianyu Lan <ltykernel@...il.com>
> Sent: Wednesday, August 23, 2023 12:06 AM
> To: Dexuan Cui <decui@...rosoft.com>; ak@...ux.intel.com;
> [...]
> On 8/12/2023 6:18 AM, Dexuan Cui wrote:
> > A fully enlightened TDX guest on Hyper-V (i.e. without the paravisor) only
> > uses the GHCI call rather than hv_hypercall_pg.
> >
> > In hv_do_hypercall(), Hyper-V requires that the input/output addresses
> > must have the cc_mask.
I'll remove the above sentence, since this is no longer true on
generally available Hyper-V: cc_mask still works, but it's not required.
> > [...]
> Reviewed-by: Tianyu Lan <tiala@...rosoft.com>
Thanks!
> > --- a/arch/x86/hyperv/hv_init.c
> > +++ b/arch/x86/hyperv/hv_init.c
> > @@ -481,6 +481,10 @@ void __init hyperv_init(void)
> > /* Hyper-V requires to write guest os id via ghcb in SNP IVM. */
> > hv_ghcb_msr_write(HV_X64_MSR_GUEST_OS_ID, guest_id);
> >
> > + /* A TDX guest uses the GHCI call rather than hv_hypercall_pg. */
> > + if (hv_isolation_type_tdx())
> > + goto skip_hypercall_pg_init;
> > +
>
> Nitpick:
> Put hypercal page initialization code into a sepearate function and
> skip the function in the tdx guest instead of adding the label.
This is doable. The intention here is to minimize the changes.
In the future, we'll introduce a hypercall function structure. We can
do code refactoring at that time.
Powered by blists - more mailing lists