From: Tianyu Lan Date: Thu, 18 Sep 2025 15:00:21 +0000 (-0400) Subject: x86/hyperv: Don't use auto-eoi when Secure AVIC is available X-Git-Tag: v6.19-rc1~56^2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c52c957e41e75d3f74157acffc53cefa3089ffa7;p=thirdparty%2Flinux.git x86/hyperv: Don't use auto-eoi when Secure AVIC is available Hyper-V doesn't support auto-eoi with Secure AVIC. So set the HV_DEPRECATING_AEOI_RECOMMENDED flag to force writing the EOI register after handling an interrupt. Reviewed-by: Michael Kelley Reviewed-by: Neeraj Upadhyay Signed-off-by: Tianyu Lan Signed-off-by: Wei Liu --- diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index c4febdbcfe4d8..217a41b63df36 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -470,6 +470,9 @@ static void __init ms_hyperv_init_platform(void) hv_identify_partition_type(); + if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC)) + ms_hyperv.hints |= HV_DEPRECATING_AEOI_RECOMMENDED; + if (ms_hyperv.hints & HV_X64_HYPERV_NESTED) { hv_nested = true; pr_info("Hyper-V: running on a nested hypervisor\n");