[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <606f7526-23b8-a114-020f-b5fcdeecf90b@intel.com>
Date: Mon, 27 Jun 2022 17:03:58 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Kai Huang <kai.huang@...el.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: seanjc@...gle.com, pbonzini@...hat.com, len.brown@...el.com,
tony.luck@...el.com, rafael.j.wysocki@...el.com,
reinette.chatre@...el.com, dan.j.williams@...el.com,
peterz@...radead.org, ak@...ux.intel.com,
kirill.shutemov@...ux.intel.com,
sathyanarayanan.kuppuswamy@...ux.intel.com,
isaku.yamahata@...el.com
Subject: Re: [PATCH v5 08/22] x86/virt/tdx: Shut down TDX module in case of
error
On 6/27/22 16:59, Kai Huang wrote:
> If so, in the assembly, I think we can just XOR TDX_SW_ERROR to the %rax and
> return %rax:
>
> 2:
> /*
> * SEAMCALL caused #GP or #UD. By reaching here %eax contains
> * the trap number. Convert trap number to TDX error code by setting
> * TDX_SW_ERROR to the high 32-bits of %rax.
> */
> xorq $TDX_SW_ERROR, %rax
>
> How does this look?
I guess it doesn't matter if you know the things being masked together
are padded correctly, but I probably would have done a straight OR, not XOR.
Otherwise, I think that looks OK. Simplifies the assembly for sure.
Powered by blists - more mailing lists