[RFC PATCH V3 1/4] x86/Hyper-V: Not use hv apic driver when Secure AVIC is available

Tianyu Lan posted 4 patches 2 months, 2 weeks ago
There is a newer version of this series
[RFC PATCH V3 1/4] x86/Hyper-V: Not use hv apic driver when Secure AVIC is available
Posted by Tianyu Lan 2 months, 2 weeks ago
From: Tianyu Lan <tiala@microsoft.com>

When Secure AVIC is available, AMD x2apic Secure
AVIC driver should be selected and return directly
in the hv_apic_init().

Signed-off-by: Tianyu Lan <tiala@microsoft.com>
---
 arch/x86/hyperv/hv_apic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
index bfde0a3498b9..1c48396e5389 100644
--- a/arch/x86/hyperv/hv_apic.c
+++ b/arch/x86/hyperv/hv_apic.c
@@ -293,6 +293,9 @@ static void hv_send_ipi_self(int vector)
 
 void __init hv_apic_init(void)
 {
+       if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC))
+               return;
+
 	if (ms_hyperv.hints & HV_X64_CLUSTER_IPI_RECOMMENDED) {
 		pr_info("Hyper-V: Using IPI hypercalls\n");
 		/*
-- 
2.25.1