[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250806091127.441323-2-ltykernel@gmail.com>
Date: Wed, 6 Aug 2025 17:11:24 +0800
From: Tianyu Lan <ltykernel@...il.com>
To: kys@...rosoft.com,
haiyangz@...rosoft.com,
wei.liu@...nel.org,
decui@...rosoft.com,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
x86@...nel.org,
hpa@...or.com,
arnd@...db.de,
Neeraj.Upadhyay@....com,
kvijayab@....com
Cc: Tianyu Lan <tiala@...rosoft.com>,
linux-arch@...r.kernel.org,
linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org,
Michael Kelley <mhklinux@...look.com>
Subject: [RFC PATCH V6 1/4] x86/hyperv: Don't use hv apic driver when Secure AVIC is available
From: Tianyu Lan <tiala@...rosoft.com>
When Secure AVIC is available, the AMD x2apic Secure
AVIC driver will be selected. In that case, have hv_apic_init()
return immediately without doing anything.
Reviewed-by: Michael Kelley <mhklinux@...look.com>
Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
Signed-off-by: Tianyu Lan <tiala@...rosoft.com>
---
Change since RFC V3:
- Update Change log and fix coding style issue.
---
arch/x86/hyperv/hv_apic.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
index bfde0a3498b9..01bc02cc0590 100644
--- a/arch/x86/hyperv/hv_apic.c
+++ b/arch/x86/hyperv/hv_apic.c
@@ -25,6 +25,7 @@
#include <linux/clockchips.h>
#include <linux/slab.h>
#include <linux/cpuhotplug.h>
+#include <linux/cc_platform.h>
#include <asm/hypervisor.h>
#include <asm/mshyperv.h>
#include <asm/apic.h>
@@ -293,6 +294,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
Powered by blists - more mailing lists