[lkml]   [2022]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10/26] x86/tdx: Support TDX guest port I/O at decompression time
On Tue, Dec 14, 2021 at 06:02:48PM +0300, Kirill A. Shutemov wrote:
> From: Kuppuswamy Sathyanarayanan <>
> Port IO triggers a #VE exception in TDX guests. During normal runtime,
> the kernel will handle those exceptions for any port IO.
> But for the early code in the decompressor, #VE cannot be used because
> the IDT needed for handling the exception is not set up.
... yet.

Well, we're setting up and IDT twice in


as early as startup_64 for SEV. And the second stage one
do_boot_stage2_vc() handles port IO too.

Can't you hook in your VE handler there too?

> Replace IN/OUT instructions with TDX IO hypercalls by defining helper
> macros __in/__out and by re-defining them in the decompressor code.
> Also, since TDX IO hypercall requires an IO size parameter, allow
> __in/__out macros to accept size as an input parameter.

Please end function/macro names with parentheses. I think in this
particular case you wanna say

"__in*()/__out*() macros"

When a function is mentioned in the changelog, either the text body or the
subject line, please use the format 'function_name()'. Omitting the
brackets after the function name can be ambiguous::

Subject: subsys/component: Make reservation_count static

reservation_count is only used in reservation_stats. Make it static.

The variant with brackets is more precise::

Subject: subsys/component: Make reservation_count() static

reservation_count() is only called from reservation_stats(). Make it


 \ /
  Last update: 2022-01-13 14:53    [W:0.335 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site