From nobody Mon Apr 6 16:31:02 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 40D4739EF3B; Wed, 4 Mar 2026 23:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772667755; cv=none; b=NEmQEQohomEwaDs2oNjiBqfPkRn2bYQ+PhxJbKOPUXPY+tTazVdQbfd2qJqwU+qw4OAP2P0PD/3/TsrUoW0Vw3I8vbUDeSW+bC2YdM8YrQPtiP8wahWLu2IkJh9qwPfnHyUns/Q360mn1/kduYFIFjb95shmoyhu0+HqYCRdR8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772667755; c=relaxed/simple; bh=t5nYwO5pX4uVzM/aRglX5MIg6SjtwvRmK+6R7EwEGdY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VKmMEIrFXxwDbFnu5extRP2K1pva5DcV22eZqllXe0XE1uzYWHuPaNAMr9F/5V+TkyJrhd486L6HSL5cjvWo3ZLxS3PySunj/FPhAjQk5a/9Bqecm+Dbk9VoLSdm62MrvCZkt+ERjC1AQD7xhYh2XSO6JMe4rmE0qokhK4yJy5c= 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=gfc6NnNB; arc=none smtp.client-ip=198.175.65.9 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="gfc6NnNB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772667755; x=1804203755; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=t5nYwO5pX4uVzM/aRglX5MIg6SjtwvRmK+6R7EwEGdY=; b=gfc6NnNB0URXYFYGp1jxY5nivbOIYhSl6kozNsT7YY0FMO6O1c7xQKGk bu2Ecy9yPet/mmxyrS6Bf2AUBJBoN7Vo58eKV5V8LnepZdvfs5dE82ImS e8bjnJCxHa2PdRfPnb1eNjvd8q86i1qfQ9Vl1P2SxOaWqpyjSmrDcI82k cTmMFV3w0RaLZ/6e/e4OiZ+OSi503vfI3jH/ZI2BLXRuiDL8kiXTqKkn1 utjDy6jQv7IYEbT24MYPlBB4HZyueSKBpgGGJsWO+oHhd+cPAllIWj7U+ ak59uE1kzab+8Zo4YyJtyQQYuw+tRAfjPscAV8HU3riZk67lh1ECM3PcV Q==; X-CSE-ConnectionGUID: IqQbMGXaTVuuwTW1lEk8IQ== X-CSE-MsgGUID: J81eRiySQ++HjI+ZvZYeLA== X-IronPort-AV: E=McAfee;i="6800,10657,11719"; a="96359399" X-IronPort-AV: E=Sophos;i="6.21,324,1763452800"; d="scan'208";a="96359399" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2026 15:42:30 -0800 X-CSE-ConnectionGUID: IafsOjuRRW6hlNz2GQ2EXA== X-CSE-MsgGUID: mnrkwTZ4SVu1hi//fyd3qg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,324,1763452800"; d="scan'208";a="215376918" Received: from unknown (HELO [172.25.112.21]) ([172.25.112.21]) by fmviesa006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2026 15:42:29 -0800 From: Ricardo Neri Date: Wed, 04 Mar 2026 15:41:19 -0800 Subject: [PATCH v9 08/10] x86/acpi: Add a helper get the address of the wakeup mailbox 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: <20260304-rneri-wakeup-mailbox-v9-8-a5c6845e6251@linux.intel.com> References: <20260304-rneri-wakeup-mailbox-v9-0-a5c6845e6251@linux.intel.com> In-Reply-To: <20260304-rneri-wakeup-mailbox-v9-0-a5c6845e6251@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 , Ricardo Neri X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772667694; l=2340; i=ricardo.neri-calderon@linux.intel.com; s=20250602; h=from:subject:message-id; bh=t5nYwO5pX4uVzM/aRglX5MIg6SjtwvRmK+6R7EwEGdY=; b=5pVLVGPbhpxYRtEKJ6Cs/CU/TZic6fN/6+qFPl0AODwB5tpYIQQWoL9kB8Fgr3rMWpec3ljas K4OHyiZiPUPD6qGRFiM9mo1fiOH9aBMDuHOatV1IAqBBVXQrSkDPHPl X-Developer-Key: i=ricardo.neri-calderon@linux.intel.com; a=ed25519; pk=NfZw5SyQ2lxVfmNMaMR6KUj3+0OhcwDPyRzFDH9gY2w= A Hyper-V VTL level 2 guest in a TDX environment needs to map the physical page of the ACPI Multiprocessor Wakeup Structure as private (encrypted). It needs to know the physical address of this structure. Add a helper function to retrieve the address. Suggested-by: Michael Kelley Acked-by: Rafael J. Wysocki (Intel) Signed-off-by: Ricardo Neri --- Changes in v9: - None Changes in v8: - Added Acked-by tag from Rafael. Thanks! Changes in v7: - Moved the added function to arch/x86/kernel/acpi/madt_wakeup.c - Dropped Reviewed-by tags from Dexuan and Michael as this patch changed. Changes in v6: - Added Reviewed-by tag from Dexuan. Thanks! Changes in v5: - None Changes in v4: - Renamed function to acpi_get_mp_wakeup_mailbox_paddr(). - Added Reviewed-by tag from Michael. Thanks! Changes in v3: - Introduced this patch Changes in v2: - N/A --- arch/x86/include/asm/acpi.h | 6 ++++++ arch/x86/kernel/acpi/madt_wakeup.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 820df375df79..c4e6459bd56b 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h @@ -184,6 +184,7 @@ void __iomem *x86_acpi_os_ioremap(acpi_physical_address= phys, acpi_size size); =20 void acpi_setup_mp_wakeup_mailbox(u64 addr); struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void= ); +u64 acpi_get_mp_wakeup_mailbox_paddr(void); =20 #else /* !CONFIG_ACPI */ =20 @@ -210,6 +211,11 @@ static inline struct acpi_madt_multiproc_wakeup_mailbo= x *acpi_get_mp_wakeup_mail return NULL; } =20 +static inline u64 acpi_get_mp_wakeup_mailbox_paddr(void) +{ + return 0; +} + #endif /* !CONFIG_ACPI */ =20 #define ARCH_HAS_POWER_INIT 1 diff --git a/arch/x86/kernel/acpi/madt_wakeup.c b/arch/x86/kernel/acpi/madt= _wakeup.c index 82caf44b45e3..48734e4a6e8f 100644 --- a/arch/x86/kernel/acpi/madt_wakeup.c +++ b/arch/x86/kernel/acpi/madt_wakeup.c @@ -258,3 +258,8 @@ struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_= wakeup_mailbox(void) { return acpi_mp_wake_mailbox; } + +u64 acpi_get_mp_wakeup_mailbox_paddr(void) +{ + return acpi_mp_wake_mailbox_paddr; +} --=20 2.43.0