From nobody Mon Feb 9 08:29:41 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 07AB23043C9; Wed, 7 Jan 2026 21:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767822367; cv=none; b=F1Sdnu9v+Q3Jx01dOARLaWDKJT/W6lfYSOow3z8q+AW6xeH7Vg/LXSlY0bh7SeXjKLJladPNd9/G/VBzfJThvbvdyH7O5mQ+H2NlmQIrbb8MhSHJzU375mBuGdbrujiEdVpH1w3t0mJbTf6nRmowA4DG5iNykMryLQzzR8X2jfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767822367; c=relaxed/simple; bh=v5H97xEUAh2fKGmHeY0PK9adgotGRC32vqqKPF82Vx8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XLEWCH9UYhKT+JEu4I4fefiv5XGsUkn7efgXkRnX6HK7nKiihOhnVXhY8EIL85/gZVes+TB7lH4h0ikF/e41p9jbxk3n3V/Kcfw0WG8bsvRbpS+Fcj6lH6kqHn9LVk4oW1+kfVFt7mCkgj+QWkd4MrEwrDfZEh+6Jpi5+noc5+A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WMX35N6W; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WMX35N6W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767822366; x=1799358366; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=v5H97xEUAh2fKGmHeY0PK9adgotGRC32vqqKPF82Vx8=; b=WMX35N6Wn6oqIjcRf/IsX5+gbekfhl6iP7U13IULBGEAddziIH/5WIvb FxK460gMlWklpSb3Gu/6uUHGQQ0tesGgQs4JX73lLPdiiAZexmbcVK7sQ CdRAQVrPbqj6SSP/5SNvnxYsHQmGOiEDxGLm55K4XxEgpMGqnu14y9p6i Q8S1fXycfPB4LIMAHuOn0tFr/PZ1RbepsdtIYlhIQ9TZhgi2u8pGBldJi Gj6gtaf+qyaHbAtc83bjgY/p9MWU1wCiskr5S4GcB5jnOdgrmeyPfj5E4 JKRBkjjGlQKWKCd+ut4MitaUQKvoweGU/jQ9wpo09pCOpb1t3Zx8e5mOC g==; X-CSE-ConnectionGUID: iDlaFtp4SLKfaxL4ae5CvQ== X-CSE-MsgGUID: n6mCimHySfKvs/bSH6DCMg== X-IronPort-AV: E=McAfee;i="6800,10657,11664"; a="69359289" X-IronPort-AV: E=Sophos;i="6.21,209,1763452800"; d="scan'208";a="69359289" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2026 13:46:02 -0800 X-CSE-ConnectionGUID: Je3Vdo9nSeW2rMVExiWCRg== X-CSE-MsgGUID: pMNoNe03SnemlgNr0iQiuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,209,1763452800"; d="scan'208";a="207510909" Received: from unknown (HELO [172.25.112.21]) ([172.25.112.21]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2026 13:46:02 -0800 From: Ricardo Neri Date: Wed, 07 Jan 2026 13:44:41 -0800 Subject: [PATCH v8 05/10] x86/hyperv/vtl: Set real_mode_header in hv_vtl_init_platform() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260107-rneri-wakeup-mailbox-v8-5-2f5b6785f2f5@linux.intel.com> References: <20260107-rneri-wakeup-mailbox-v8-0-2f5b6785f2f5@linux.intel.com> In-Reply-To: <20260107-rneri-wakeup-mailbox-v8-0-2f5b6785f2f5@linux.intel.com> To: x86@kernel.org, Krzysztof Kozlowski , Conor Dooley , Rob Herring , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Michael Kelley , "Rafael J. Wysocki" Cc: Saurabh Sengar , Chris Oo , "Kirill A. Shutemov" , linux-hyperv@vger.kernel.org, devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri , Yunhong Jiang , Thomas Gleixner , Ricardo Neri X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767822314; l=2337; i=ricardo.neri-calderon@linux.intel.com; s=20250602; h=from:subject:message-id; bh=ErMFLuUmTpaxMgKxhwcgqcXaQtOiQTa7wQ9vKMhnTo4=; b=AYbsMzrKcaHaBESlMN2ZQJk4U3C9VR1nVwxjIHa9KrkjrdxOIWgaHUZltI5+ZUgi1kuuZHV0i GMTjUsqgVWTABhctud5mZwYAuyXZL0F/f93/4yJxNb2PHr+Kzq9vbnb X-Developer-Key: i=ricardo.neri-calderon@linux.intel.com; a=ed25519; pk=NfZw5SyQ2lxVfmNMaMR6KUj3+0OhcwDPyRzFDH9gY2w= From: Yunhong Jiang Hyper-V VTL clears x86_platform.realmode_{init(), reserve()} in hv_vtl_init_platform() whereas it sets real_mode_header later in hv_vtl_early_init(). There is no need to deal with the settings of real mode memory in two places. Also, both functions are called much earlier than x86_platform.realmode_init() (via an early_initcall), where the real_mode_header is needed. Set real_mode_header in hv_vtl_init_platform() to keep all code dealing with memory for the real mode trampoline in one place. Besides making the code more readable, it prepares it for a subsequent changeset in which the behavior needs to change to support Hyper-V VTL guests in TDX a environment. Reviewed-by: Dexuan Cui Reviewed-by: Michael Kelley Suggested-by: Thomas Gleixner Signed-off-by: Yunhong Jiang Signed-off-by: Ricardo Neri --- Changes in v8: - None Changes in v7: - None Changes in v6: - Corrected reference to hv_vtl_init_platform() in the changelog. (Dexuan) - Added Reviewed-by tag from Dexuan. Thanks! Changes in v5: - None Changes in v4: - Added Reviewed-by tag from Michael. Thanks! Changes in v3: - Edited the commit message for clarity. Changes in v2: - Introduced this patch. --- arch/x86/hyperv/hv_vtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/hyperv/hv_vtl.c b/arch/x86/hyperv/hv_vtl.c index c0edaed0efb3..f74199e77133 100644 --- a/arch/x86/hyperv/hv_vtl.c +++ b/arch/x86/hyperv/hv_vtl.c @@ -70,6 +70,7 @@ void __init hv_vtl_init_platform(void) =20 x86_platform.realmode_reserve =3D x86_init_noop; x86_platform.realmode_init =3D x86_init_noop; + real_mode_header =3D &hv_vtl_real_mode_header; x86_init.irqs.pre_vector_init =3D x86_init_noop; x86_init.timers.timer_init =3D x86_init_noop; x86_init.resources.probe_roms =3D x86_init_noop; @@ -249,7 +250,6 @@ int __init hv_vtl_early_init(void) panic("XSAVE has to be disabled as it is not supported by this module.\n" "Please add 'noxsave' to the kernel command line.\n"); =20 - real_mode_header =3D &hv_vtl_real_mode_header; apic_update_callback(wakeup_secondary_cpu_64, hv_vtl_wakeup_secondary_cpu= ); =20 return 0; --=20 2.43.0