diff options
| author | Nuno Das Neves <nunodasneves@linux.microsoft.com> | 2025-03-14 22:28:50 +0300 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-03-21 00:23:04 +0300 |
| commit | af37bc759f1064cc4dc0a6a12afd3fb25c12fe4d (patch) | |
| tree | ff37d813ae9df271b259def1529ba1d0c5e93cad /include | |
| parent | feba84c2c98109cd784de931240c0dab6396c0d7 (diff) | |
| download | linux-af37bc759f1064cc4dc0a6a12afd3fb25c12fe4d.tar.xz | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/mshyperv.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index c3697bc0598d..8519b8ec8e9d 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -77,6 +77,19 @@ u64 hv_do_fast_hypercall16(u16 control, u64 input1, u64 input2); bool hv_isolation_type_snp(void); bool hv_isolation_type_tdx(void); +/* + * On architectures where Hyper-V doesn't support AEOI (e.g., ARM64), + * it doesn't provide a recommendation flag and AEOI must be disabled. + */ +static inline bool hv_recommend_using_aeoi(void) +{ +#ifdef HV_DEPRECATING_AEOI_RECOMMENDED + return !(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED); +#else + return false; +#endif +} + static inline struct hv_proximity_domain_info hv_numa_node_to_pxm_info(int node) { struct hv_proximity_domain_info pxm_info = {}; |
