[PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)

Dexuan Cui posted 2 patches 2 years, 7 months ago
There is a newer version of this series
arch/x86/coco/tdx/tdx.c           | 87 ++++++++++++++++++++++++++-----
arch/x86/include/asm/shared/tdx.h |  2 +
2 files changed, 77 insertions(+), 12 deletions(-)
[PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
Posted by Dexuan Cui 2 years, 7 months ago
The two patches are based on today's tip.git's master branch.

Note: the two patches don't apply to the current x86/tdx branch, which
doesn't have commit 75d090fd167a ("x86/tdx: Add unaccepted memory support").

As Dave suggested, I moved some local variables of tdx_map_gpa() to
inside the loop. I added Sathyanarayanan's Reviewed-by.

Please review.

FWIW, the old versons are here:
v8: https://lwn.net/ml/linux-kernel/20230620154830.25442-1-decui@microsoft.com/
v7: https://lwn.net/ml/linux-kernel/20230616044701.15888-1-decui%40microsoft.com/
v6: https://lwn.net/ml/linux-kernel/20230504225351.10765-1-decui@microsoft.com/

Dexuan Cui (2):
  x86/tdx: Retry TDVMCALL_MAP_GPA() when needed
  x86/tdx: Support vmalloc() for tdx_enc_status_changed()

 arch/x86/coco/tdx/tdx.c           | 87 ++++++++++++++++++++++++++-----
 arch/x86/include/asm/shared/tdx.h |  2 +
 2 files changed, 77 insertions(+), 12 deletions(-)

-- 
2.25.1
Re: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
Posted by Wei Liu 2 years, 7 months ago
On Wed, Jun 21, 2023 at 12:13:15PM -0700, Dexuan Cui wrote:
> The two patches are based on today's tip.git's master branch.
> 
> Note: the two patches don't apply to the current x86/tdx branch, which
> doesn't have commit 75d090fd167a ("x86/tdx: Add unaccepted memory support").
> 
> As Dave suggested, I moved some local variables of tdx_map_gpa() to
> inside the loop. I added Sathyanarayanan's Reviewed-by.
> 
> Please review.
> 
> FWIW, the old versons are here:
> v8: https://lwn.net/ml/linux-kernel/20230620154830.25442-1-decui@microsoft.com/
> v7: https://lwn.net/ml/linux-kernel/20230616044701.15888-1-decui%40microsoft.com/
> v6: https://lwn.net/ml/linux-kernel/20230504225351.10765-1-decui@microsoft.com/
> 
> Dexuan Cui (2):
>   x86/tdx: Retry TDVMCALL_MAP_GPA() when needed
>   x86/tdx: Support vmalloc() for tdx_enc_status_changed()
> 
>  arch/x86/coco/tdx/tdx.c           | 87 ++++++++++++++++++++++++++-----
>  arch/x86/include/asm/shared/tdx.h |  2 +
>  2 files changed, 77 insertions(+), 12 deletions(-)

Dexuan, do you expect these to go through the Hyper-V tree?

Thanks,
Wei.

> 
> -- 
> 2.25.1
>
RE: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
Posted by Dexuan Cui 2 years, 7 months ago
> From: Wei Liu <wei.liu@kernel.org>
> Sent: Wednesday, June 28, 2023 11:06 AM
> To: Dexuan Cui <decui@microsoft.com>
> Subject: Re: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx
> part)
> 
> On Wed, Jun 21, 2023 at 12:13:15PM -0700, Dexuan Cui wrote:
> > The two patches are based on today's tip.git's master branch.
> >
> > Note: the two patches don't apply to the current x86/tdx branch, which
> > doesn't have commit 75d090fd167a ("x86/tdx: Add unaccepted memory
> support").
> >
> > As Dave suggested, I moved some local variables of tdx_map_gpa() to
> > inside the loop. I added Sathyanarayanan's Reviewed-by.
> >
> > Please review.
> > ...
> > Dexuan Cui (2):
> >   x86/tdx: Retry TDVMCALL_MAP_GPA() when needed
> >   x86/tdx: Support vmalloc() for tdx_enc_status_changed()
> >
> >  arch/x86/coco/tdx/tdx.c           | 87
> ++++++++++++++++++++++++++-----
> >  arch/x86/include/asm/shared/tdx.h |  2 +
> >  2 files changed, 77 insertions(+), 12 deletions(-)
> 
> Dexuan, do you expect these to go through the Hyper-V tree?
> 
> Thanks,
> Wei.

I suppose Dave and/or other x86 folks would like the 2 patches to go
through the tip tree if the patches look good. 

Hi Dave, any comments on the patches?

Thanks,
Dexuan
RE: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
Posted by Dexuan Cui 2 years, 7 months ago
> From: Dexuan Cui <decui@microsoft.com>
> Sent: Wednesday, June 28, 2023 11:45 AM
> To: Wei Liu <wei.liu@kernel.org>
> ...
> > From: Wei Liu <wei.liu@kernel.org>
> > Sent: Wednesday, June 28, 2023 11:06 AM
> > To: Dexuan Cui <decui@microsoft.com>
> > Subject: Re: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx
> > part)
> >
> > On Wed, Jun 21, 2023 at 12:13:15PM -0700, Dexuan Cui wrote:
> > > The two patches are based on today's tip.git's master branch.
> > >
> > > Note: the two patches don't apply to the current x86/tdx branch, which
> > > doesn't have commit 75d090fd167a ("x86/tdx: Add unaccepted memory
> > support").
> > >
> > > As Dave suggested, I moved some local variables of tdx_map_gpa() to
> > > inside the loop. I added Sathyanarayanan's Reviewed-by.
> > >
> > > Please review.
> > > ...
> > > Dexuan Cui (2):
> > >   x86/tdx: Retry TDVMCALL_MAP_GPA() when needed
> > >   x86/tdx: Support vmalloc() for tdx_enc_status_changed()
> > ...
> > Dexuan, do you expect these to go through the Hyper-V tree?
> >
> > Thanks,
> > Wei.
> 
> I suppose Dave and/or other x86 folks would like the 2 patches to go
> through the tip tree if the patches look good.
> 
> Hi Dave, any comments on the patches?

Hi Dave, would you please take a look at the 2 patches?

The patches have got Reviewed-by/Acked-by from Kirill, Sathyanarayanan
and Michael.
The patches can still apply cleanly on today's tip tree's master branch.
 
Thanks,
Dexuan
RE: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
Posted by Dexuan Cui 2 years, 6 months ago
> From: Dexuan Cui
> Sent: Monday, July 10, 2023 10:21 AM
> To: Dexuan Cui <decui@microsoft.com>; Wei Liu <wei.liu@kernel.org>;
> dave.hansen@intel.com; dave.hansen@linux.intel.com; bp@alien8.de;
> kirill.shutemov@linux.intel.com
> Cc: ak@linux.intel.com; arnd@arndb.de; brijesh.singh@amd.com;
> dan.j.williams@intel.com; Haiyang Zhang <haiyangz@microsoft.com>;
> hpa@zytor.com; jane.chu@oracle.com; KY Srinivasan <kys@microsoft.com>;
> linux-arch@vger.kernel.org; linux-hyperv@vger.kernel.org; luto@kernel.org;
> mingo@redhat.com; peterz@infradead.org; rostedt@goodmis.org;
> sathyanarayanan.kuppuswamy@linux.intel.com; seanjc@google.com;
> tglx@linutronix.de; tony.luck@intel.com; x86@kernel.org; Michael Kelley
> (LINUX) <mikelley@microsoft.com>; linux-kernel@vger.kernel.org; Tianyu Lan
> <Tianyu.Lan@microsoft.com>; rick.p.edgecombe@intel.com
> Subject: RE: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx part)
> 
> > From: Dexuan Cui <decui@microsoft.com>
> > Sent: Wednesday, June 28, 2023 11:45 AM
> > To: Wei Liu <wei.liu@kernel.org>
> > ...
> > > From: Wei Liu <wei.liu@kernel.org>
> > > Sent: Wednesday, June 28, 2023 11:06 AM
> > > To: Dexuan Cui <decui@microsoft.com>
> > > Subject: Re: [PATCH v9 0/2] Support TDX guests on Hyper-V (the x86/tdx
> > > part)
> > >
> > > On Wed, Jun 21, 2023 at 12:13:15PM -0700, Dexuan Cui wrote:
> > > > The two patches are based on today's tip.git's master branch.
> > > >
> > > > Note: the two patches don't apply to the current x86/tdx branch, which
> > > > doesn't have commit 75d090fd167a ("x86/tdx: Add unaccepted
> memory
> > > support").
> > > >
> > > > As Dave suggested, I moved some local variables of tdx_map_gpa() to
> > > > inside the loop. I added Sathyanarayanan's Reviewed-by.
> > > >
> > > > Please review.
> > > > ...
> > > > Dexuan Cui (2):
> > > >   x86/tdx: Retry TDVMCALL_MAP_GPA() when needed
> > > >   x86/tdx: Support vmalloc() for tdx_enc_status_changed()
> > > ...
> > > Dexuan, do you expect these to go through the Hyper-V tree?
> > >
> > > Thanks,
> > > Wei.
> >
> > I suppose Dave and/or other x86 folks would like the 2 patches to go
> > through the tip tree if the patches look good.
> >
> > Hi Dave, any comments on the patches?
> 
> Hi Dave, would you please take a look at the 2 patches?
> 
> The patches have got Reviewed-by/Acked-by from Kirill, Sathyanarayanan
> and Michael.
> The patches can still apply cleanly on today's tip tree's master branch.
> 
> Thanks,
> Dexuan

Hi Dave, kindly ping.