lkml.org 
[lkml]   [2023]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 05/20] x86/virt/tdx: Add SEAMCALL infrastructure
On Tue, Jun 20, 2023 at 10:37:16AM +0000, Huang, Kai wrote:
> > > + /*
> > > + * SEAMCALL caused #GP or #UD. By reaching here %eax contains
> > > + * the trap number. Convert the trap number to the TDX error
> > > + * code by setting TDX_SW_ERROR to the high 32-bits of %rax.
> > > + *
> > > + * Note cannot OR TDX_SW_ERROR directly to %rax as OR instruction
> > > + * only accepts 32-bit immediate at most.
> >
> > Not sure if that comment is really helpful here. It's a common pattern
> > for large immediates, no?
>
> I am not sure. I guess I am not expert of x86 assembly but only casual writer.
>
> Hi Dave, Kirill,
>
> Are you OK to remove it?

I would rather keep it. I wanted to ask why separate MOV is needed here,
before I read the comment. Also size of $TDX_SW_ERROR is not visible here,
so it contributes to possible confusion without the comment.

--
Kiryl Shutsemau / Kirill A. Shutemov

\
 
 \ /
  Last update: 2023-06-20 14:22    [W:0.312 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site