Skip to content

Commit 04a67e5

Browse files
committed
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 firmware enumerates the mailbox via either an ACPI table or a DeviceTree node. If the wakeup mailbox is present, the kernel updates the APIC callback wakeup_secondary_cpu_64() to use it. Reviewed-by: Dexuan Cui <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Ricardo Neri <[email protected]>
1 parent f290b51 commit 04a67e5

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
@@ -280,7 +280,8 @@ int __init hv_vtl_early_init(void)
280280
* Otherwise, use an enlightened path since SIPI is not
281281
* available for VTL2.
282282
*/
283-
if (!(hv_isolation_type_snp() && !hyperv_paravisor_present))
283+
if (!((hv_isolation_type_snp() || hv_isolation_type_tdx()) &&
284+
!hyperv_paravisor_present))
284285
apic_update_callback(wakeup_secondary_cpu_64, hv_vtl_wakeup_secondary_cpu);
285286

286287
return 0;

0 commit comments

Comments
 (0)