[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0je4h8BMuwW5bCbuqSwMLdH9yQg0AczrO7ccPZXDsX3tA@mail.gmail.com>
Date: Mon, 24 Nov 2025 17:03:03 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc: x86@...nel.org, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Rob Herring <robh@...nel.org>, "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>, Michael Kelley <mhklinux@...look.com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Saurabh Sengar <ssengar@...ux.microsoft.com>,
Chris Oo <cho@...rosoft.com>, "Kirill A. Shutemov" <kas@...nel.org>, linux-hyperv@...r.kernel.org,
devicetree@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Ricardo Neri <ricardo.neri@...el.com>
Subject: Re: [PATCH v7 7/9] x86/acpi: Add a helper get the address of the
wakeup mailbox
On Mon, Nov 17, 2025 at 6:04 PM Ricardo Neri
<ricardo.neri-calderon@...ux.intel.com> wrote:
>
> 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 <mhklinux@...look.com>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Acked-by: Rafael J. Wysocki (Intel) <rafael@...nel.org>
> ---
> 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);
>
> 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);
>
> #else /* !CONFIG_ACPI */
>
> @@ -210,6 +211,11 @@ static inline struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mail
> return NULL;
> }
>
> +static inline u64 acpi_get_mp_wakeup_mailbox_paddr(void)
> +{
> + return 0;
> +}
> +
> #endif /* !CONFIG_ACPI */
>
> #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;
> +}
>
> --
> 2.43.0
>
Powered by blists - more mailing lists