[lkml]   [2022]   [Jan]   [17]   [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 Mon, Jan 17, 2022 at 05:39:20PM +0300, Kirill A. Shutemov wrote:
> arch/x86/boot and arch/x86/boot/compressed are separate linking domains.
> boot/ uses own implementation while boot/compressed uses implementation
> from <asm/io.h>. Decopliing boot/compressed from <asm/io.h> requires hack.
> See #define _ACPI_IO_H_ below.

I am painfully aware. And the need to share code with kernel proper has
grown quite the nasties in the meantime.

So, we talked about what to do here recently and the suggestion was to
librarize common functionality so that

1. it can be shared between the two.
2. changes in the kernel proper headers do not break the boot stubs.

So, instead of yet another duplication, I think what we should do is
start growing a shared/ header namespace, i.e.,


for example, and put there common, well, shared, functionality between
boot stubs and kernel proper. Stuff which is basic and generic enough so
that it can be shared by both.

That would be a prepatch.

Then, ontop, I'm wondering if it would be cleaner to have in/out
function pointers in the boot stub which are assigned by default to
those __in/__out generic shared handlers and then early_tdx_detect()
would assign to them tdx_io_{in,out} when it detects it is running as a
TDX guest.



 \ /
  Last update: 2022-01-17 19:33    [W:0.098 / U:3.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site