diff options
| author | Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2026-03-04 15:41:19 -0800 |
|---|---|---|
| committer | Dexuan Cui <decui@microsoft.com> | 2026-05-28 20:01:25 +0000 |
| commit | 12584a89c9172ed5c2718612314a2d6f87260896 (patch) | |
| tree | 46ae0f1adba406c8d4eba91fab3a95cab79dbb75 /arch | |
| parent | aa7719039bd9e378c8c134b8ce5fa5f4e13cda73 (diff) | |
| download | linux-next-history-12584a89c9172ed5c2718612314a2d6f87260896.tar.gz | |
x86/acpi: Add a helper to get the address of the wakeup mailbox
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@outlook.com>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Dexuan Cui <dexuan@kernel.org>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/include/asm/acpi.h | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/acpi/madt_wakeup.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 820df375df794..c4e6459bd56b1 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 82caf44b45e39..48734e4a6e8f5 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; +} |
