linux/arch/x86/hyperv
Tianyu Lan 49d6a3c062 x86/Hyper-V: Add SEV negotiate protocol support in Isolation VM
Hyper-V Isolation VM current code uses sev_es_ghcb_hv_call()
to read/write MSR via GHCB page and depends on the sev code.
This may cause regression when sev code changes interface
design.

The latest SEV-ES code requires to negotiate GHCB version before
reading/writing MSR via GHCB page and sev_es_ghcb_hv_call() doesn't
work for Hyper-V Isolation VM. Add Hyper-V ghcb related implementation
to decouple SEV and Hyper-V code. Negotiate GHCB version in the
hyperv_init() and use the version to communicate with Hyper-V
in the ghcb hv call function.

Fixes: 2ea29c5abb ("x86/sev: Save the negotiated GHCB version")
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20220614014553.1915929-1-ltykernel@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2022-06-15 18:27:40 +00:00
..
hv_apic.c x86/hyperv: Avoid erroneously sending IPI to 'self' 2021-10-06 15:56:45 +00:00
hv_init.c x86/Hyper-V: Add SEV negotiate protocol support in Isolation VM 2022-06-15 18:27:40 +00:00
hv_proc.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status 2021-04-21 09:49:19 +00:00
hv_spinlock.c x86/hyperv: Fix unused variable 'msr_val' warning in hv_qlock_wait 2021-03-24 11:31:04 +00:00
irqdomain.c x86/hyperv: Refactor hv_msi_domain_free_irqs() 2021-12-09 11:52:21 +01:00
ivm.c x86/Hyper-V: Add SEV negotiate protocol support in Isolation VM 2022-06-15 18:27:40 +00:00
Makefile x86/hyperv: Add new hvcall guest address host visibility support 2021-10-28 11:21:33 +00:00
mmu.c x86/hyperv: Properly deal with empty cpumasks in hyperv_flush_tlb_multi() 2022-01-10 11:50:20 +00:00
nested.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status 2021-04-21 09:49:19 +00:00