From nobody Mon Feb 9 13:35:18 2026 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 691DD423162 for ; Tue, 20 Jan 2026 19:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938898; cv=none; b=kVRez1vMbwO+kFvXav7C0etD+5/k9N5c4iC1egdG67h+uF4DEcA8FwD+H65neu3CXJS7lLqyYCsmzLFeBT1eQFx1rZDKSpcnMsLRJTfmDMxwAi3jWSrcWmTbaw5Zu3INR0yekQtEL+ZH/kTEr91rInEx7ZCjqT+JEP+pID2RDNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938898; c=relaxed/simple; bh=7uKuifd5hg9zyYE+Th7mxjry6UYrnyLf5x6U9gCahbs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DZGCX92B/0Qo/SgPg86Ksl6rlwxRC1pJ3MV85aCF+EF69gVL4n9SQw5daNPmRhrGhbLTeT0RGHGnNXFbL4hqBqoJRb5FTtyEtxdeS05tB+ilmg0t1jm65JFEORyHoP46NANU4x3J4A/sY4rrnTiEVqdNuCcQxbVybTu610cK0QU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=MyBJauUR; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="MyBJauUR" Received: from mail.zytor.com ([IPv6:2601:646:8081:9483:12c5:bc8e:d949:3497]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 60KJsD383899199 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 20 Jan 2026 11:54:15 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 60KJsD383899199 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025122301; t=1768938858; bh=2Jsmp6SNJo0r+L2zMO/RO98Z1QirHh+gFi5n8Bhoc0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MyBJauURVSbGI9VA/glfPxaFZmpMmE/H+GadkKxlRAg36BsvZndBKJgTCs3rn5cod YGhbvTH4Y63zWL2j19MMQMulwwiGRvkx4AqKzkuu3lSuMa9RecaHhV89+EXzz0AQMW 91/QgYutgVO/FRFh8mNzFpAJPvHhSdxbx8sTd0FIJy0Y9txcMKiIWKFXg14dSFQ7kz voPLLH/HYD7tr7LsUtnfGQUoVk2eXqXJpX8I98AOHKwQGBxgFvOUEh1EazRXZoMpKT p2AeJX5KmwnpYYJVa0N73MFIP+59sZ4suGFCKWUfhHlJslxah28seI5rVIX1b270j3 m2ZmBD36fkLqg== From: "H. Peter Anvin" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Uros Bizjak , Petr Mladek , Andrew Morton , Kees Cook , "Peter Zijlstra (Intel)" , Nathan Chancellor , Kiryl Shutsemau , Rick Edgecombe Cc: "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, x86@kernel.org Subject: [PATCH v1 01/14] x86/realmode: remove I/O port paravirtualization Date: Tue, 20 Jan 2026 11:53:53 -0800 Message-ID: <20260120195407.1163051-2-hpa@zytor.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260120195407.1163051-1-hpa@zytor.com> References: <20260119192923.651588-1-hpa@zytor.com> <20260120195407.1163051-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In commit: eb4ea1ae8f45 x86/boot: Port I/O: Allow to hook up alternative helpers ... paravirtualization hooks were added to (some!) of the port I/O functions. However, they were only ever used in the 32/64-bit "compressed" directory, and never made any sense in the real-mode code, which is notoriously size sensitive. Without these hooks, is usable directly, so mode io.h into the compressed/ directory and replace "io.h" with for the actual real-mode code. Signed-off-by: H. Peter Anvin (Intel) Acked-by: Kiryl Shutsemau --- arch/x86/boot/boot.h | 2 +- arch/x86/boot/{ =3D> compressed}/io.h | 0 arch/x86/boot/compressed/misc.h | 2 +- arch/x86/boot/compressed/tdx.c | 2 +- arch/x86/boot/main.c | 5 +---- arch/x86/realmode/rm/wakemain.c | 4 ---- 6 files changed, 4 insertions(+), 11 deletions(-) rename arch/x86/boot/{ =3D> compressed}/io.h (100%) diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 8e3eab34dff4..f185931283cb 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -18,6 +18,7 @@ =20 #ifndef __ASSEMBLER__ =20 +#include #include #include #include @@ -26,7 +27,6 @@ #include "bitops.h" #include "ctype.h" #include "cpuflags.h" -#include "io.h" =20 /* Useful macros */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) diff --git a/arch/x86/boot/io.h b/arch/x86/boot/compressed/io.h similarity index 100% rename from arch/x86/boot/io.h rename to arch/x86/boot/compressed/io.h diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/mis= c.h index fd855e32c9b9..68957e7698ad 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -43,8 +43,8 @@ =20 #define BOOT_BOOT_H #include "../ctype.h" -#include "../io.h" =20 +#include "io.h" #include "efi.h" =20 #ifdef CONFIG_X86_64 diff --git a/arch/x86/boot/compressed/tdx.c b/arch/x86/boot/compressed/tdx.c index 8451d6a1030c..00359dbe1f8c 100644 --- a/arch/x86/boot/compressed/tdx.c +++ b/arch/x86/boot/compressed/tdx.c @@ -2,7 +2,7 @@ =20 #include "../cpuflags.h" #include "../string.h" -#include "../io.h" +#include "io.h" #include "error.h" =20 #include diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 9d0fea18d3c8..da01ade4959e 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c @@ -15,10 +15,9 @@ #include "boot.h" #include "string.h" =20 +/* Buffer for building the full "zero page" struct boot_params */ struct boot_params boot_params __attribute__((aligned(16))); =20 -struct port_io_ops pio_ops; - char *HEAP =3D _end; char *heap_end =3D _end; /* Default end of heap =3D no heap */ =20 @@ -132,8 +131,6 @@ static void init_heap(void) =20 void main(void) { - init_default_io_ops(); - /* First, copy the boot header into the "zeropage" */ copy_boot_params(); =20 diff --git a/arch/x86/realmode/rm/wakemain.c b/arch/x86/realmode/rm/wakemai= n.c index a6f4d8388ad8..1d6437e6d2ba 100644 --- a/arch/x86/realmode/rm/wakemain.c +++ b/arch/x86/realmode/rm/wakemain.c @@ -62,12 +62,8 @@ static void send_morse(const char *pattern) } } =20 -struct port_io_ops pio_ops; - void main(void) { - init_default_io_ops(); - /* Kill machine if structures are wrong */ if (wakeup_header.real_magic !=3D 0x12345678) while (1) --=20 2.52.0