Skip to content

Commit 1da55cf

Browse files
ricardonallenpais
authored andcommitted
x86/smpwakeup: Add a helper get the address of the wakeup mailbox
A Hyper-V VTL level 2 guest on 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. Reviewed-by: Michael Kelley <[email protected]> Suggested-by: Michael Kelley <[email protected]> Signed-off-by: Ricardo Neri <[email protected]>
1 parent 227b660 commit 1da55cf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

arch/x86/include/asm/smp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ static inline struct cpumask *cpu_l2c_shared_mask(int cpu)
154154

155155
void acpi_setup_mp_wakeup_mailbox(u64 addr);
156156
struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void);
157+
u64 acpi_get_mp_wakeup_mailbox_paddr(void);
157158

158159
#else /* !CONFIG_SMP */
159160
#define wbinvd_on_cpu(cpu) wbinvd()

arch/x86/kernel/smpwakeup.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void)
8181
{
8282
return acpi_mp_wake_mailbox;
8383
}
84+
85+
u64 acpi_get_mp_wakeup_mailbox_paddr(void)
86+
{
87+
return acpi_mp_wake_mailbox_paddr;
88+
}

0 commit comments

Comments
 (0)