RE: [RFC PATCH V4 1/4] x86/hyperv: Don't use hv apic driver when Secure AVIC is available
From: Michael Kelley
Date: Mon Jul 28 2025 - 10:44:39 EST
From: Tianyu Lan <ltykernel@xxxxxxxxx> Sent: Saturday, July 26, 2025 6:43 AM
>
> 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.
>
> Signed-off-by: Tianyu Lan <tiala@xxxxxxxxxxxxx>
> ---
> Change since RFC V3:
> - Update Change log and fix coding style issue.
> ---
> 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..e669053b637d 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
>
Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>