lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC v2-fix-v2 1/3] x86/tdx: Handle port I/O in decompression code
On Tue, Jun 8, 2021 at 8:40 AM Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>
> Add support to replace in/out instructions in
> decompression code with TDX IO hypercalls.
>
> TDX cannot do port IO directly. The TDX module triggers
> a #VE exception to let the guest kernel to emulate port
> I/O, by converting them into TDX hypercalls to call the
> host.
>
> But for the really early code in the decompressor, #VE
> cannot be used because the IDT needed for handling the
> exception is not set-up, and some other infrastructure
> needed by the handler is missing. So to support port IO
> in decompressor code, directly replace in/out instructions
> with TDX IO hypercalls. This can beeasily achieved by
> modifying __in/__out macros.
>
> Also, since TDX IO hypercall requires an IO size parameter,
> modify __in/__out macros to accept size as input parameter.

Looks good to me:

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

\
 
 \ /
  Last update: 2021-06-09 01:13    [W:0.213 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site