Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hyperv: Introduce hv_recommend_using_aeoi()

Factor out the check for enabling auto eoi, to be reused in root
partition code.

No functional changes.

Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Link: https://lore.kernel.org/r/1741980536-3865-5-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1741980536-3865-5-git-send-email-nunodasneves@linux.microsoft.com>

authored by

Nuno Das Neves and committed by
Wei Liu
af37bc75 feba84c2

+14 -11
+1 -11
drivers/hv/hv.c
··· 313 313 314 314 shared_sint.vector = vmbus_interrupt; 315 315 shared_sint.masked = false; 316 - 317 - /* 318 - * On architectures where Hyper-V doesn't support AEOI (e.g., ARM64), 319 - * it doesn't provide a recommendation flag and AEOI must be disabled. 320 - */ 321 - #ifdef HV_DEPRECATING_AEOI_RECOMMENDED 322 - shared_sint.auto_eoi = 323 - !(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED); 324 - #else 325 - shared_sint.auto_eoi = 0; 326 - #endif 316 + shared_sint.auto_eoi = hv_recommend_using_aeoi(); 327 317 hv_set_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64); 328 318 329 319 /* Enable the global synic bit */
+13
include/asm-generic/mshyperv.h
··· 77 77 bool hv_isolation_type_snp(void); 78 78 bool hv_isolation_type_tdx(void); 79 79 80 + /* 81 + * On architectures where Hyper-V doesn't support AEOI (e.g., ARM64), 82 + * it doesn't provide a recommendation flag and AEOI must be disabled. 83 + */ 84 + static inline bool hv_recommend_using_aeoi(void) 85 + { 86 + #ifdef HV_DEPRECATING_AEOI_RECOMMENDED 87 + return !(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED); 88 + #else 89 + return false; 90 + #endif 91 + } 92 + 80 93 static inline struct hv_proximity_domain_info hv_numa_node_to_pxm_info(int node) 81 94 { 82 95 struct hv_proximity_domain_info pxm_info = {};