Skip to content

Commit d1ad1ee

Browse files
ricardonallenpais
authored andcommitted
x86/hyperv/vtl: Use the wakeup mailbox to boot secondary CPUs
The hypervisor is an untrusted entity for TDX guests. It cannot be used to boot secondary CPUs. The function hv_vtl_wakeup_secondary_cpu() cannot be used. Instead, the virtual firmware boots the secondary CPUs and places them in a state to transfer control to the kernel using the wakeup mailbox. The kernel updates the APIC callback wakeup_secondary_cpu_64() to use the mailbox if detected early during boot (enumerated via either an ACPI table or a DeviceTree node). Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Ricardo Neri <[email protected]>
1 parent cc047a6 commit d1ad1ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/hyperv/hv_vtl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ int __init hv_vtl_early_init(void)
243243
* Otherwise, use an enlightened path since SIPI is not
244244
* available for VTL2.
245245
*/
246-
if (!(hv_isolation_type_snp() && !hyperv_paravisor_present))
246+
if (!((hv_isolation_type_snp() || hv_isolation_type_tdx())
247+
&& !hyperv_paravisor_present))
247248
apic_update_callback(wakeup_secondary_cpu_64, hv_vtl_wakeup_secondary_cpu);
248249

249250
return 0;

0 commit comments

Comments
 (0)