x86/hyperv: Add smp support for SEV-SNP guest
authorTianyu Lan <tiala@microsoft.com>
Fri, 18 Aug 2023 10:29:17 +0000 (06:29 -0400)
committerWei Liu <wei.liu@kernel.org>
Tue, 22 Aug 2023 00:38:20 +0000 (00:38 +0000)
commit44676bb9d566ce2bfbd132f9745eb7eb2d784476
tree0c258b796b3f341697304d45dbb1575e06848235
parent45f46b1ac95ea34cc6e81739a64cb6bec28f1185
x86/hyperv: Add smp support for SEV-SNP guest

In the AMD SEV-SNP guest, AP needs to be started up via sev es
save area and Hyper-V requires to call HVCALL_START_VP hypercall
to pass the gpa of sev es save area with AP's vp index and VTL(Virtual
trust level) parameters. Override wakeup_secondary_cpu_64 callback
with hv_snp_boot_ap.

Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Link: https://lore.kernel.org/r/20230818102919.1318039-8-ltykernel@gmail.com
arch/x86/hyperv/ivm.c
arch/x86/include/asm/mshyperv.h
arch/x86/kernel/cpu/mshyperv.c
include/asm-generic/hyperv-tlfs.h