linux-stable/arch/x86/realmode
Kirill A. Shutemov eb4ea1ae8f x86/boot: Port I/O: Allow to hook up alternative helpers
Port I/O instructions trigger #VE in the TDX environment. In response to
the exception, kernel emulates these instructions using hypercalls.

But during early boot, on the decompression stage, it is cumbersome to
deal with #VE. It is cleaner to go to hypercalls directly, bypassing #VE
handling.

Add a way to hook up alternative port I/O helpers in the boot stub with
a new pio_ops structure.  For now, set the ops structure to just call
the normal I/O operation functions.

out*()/in*() macros redefined to use pio_ops callbacks. It eliminates
need in changing call sites. io_delay() changed to use port I/O helper
instead of inline assembly.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20220405232939.73860-16-kirill.shutemov@linux.intel.com
2022-04-07 08:27:52 -07:00
..
rm x86/boot: Port I/O: Allow to hook up alternative helpers 2022-04-07 08:27:52 -07:00
init.c - Flush *all* mappings from the TLB after switching to the trampoline 2022-01-10 09:51:38 -08:00
Makefile x86, objtool: Dont exclude arch/x86/realmode/ 2021-05-12 14:54:54 +02:00
rmpiggy.S x86/asm/realmode: Use SYM_DATA_* instead of GLOBAL 2019-10-18 11:28:47 +02:00