Skip to content

Commit 2ddddd0

Browse files
kelleymhliuw
authored andcommitted
Drivers: hv: Move AEOI determination to architecture dependent code
Hyper-V on ARM64 doesn't provide a flag for the AEOI recommendation in ms_hyperv.hints, so having the test in architecture independent code doesn't work. Resolve this by moving the check of the flag to an architecture dependent helper function. No functionality is changed. Signed-off-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
1 parent 1a06d01 commit 2ddddd0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

arch/x86/include/asm/mshyperv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ typedef int (*hyperv_fill_flush_list_func)(
3434
rdmsrl(HV_X64_MSR_SINT0 + int_num, val)
3535
#define hv_set_synint_state(int_num, val) \
3636
wrmsrl(HV_X64_MSR_SINT0 + int_num, val)
37+
#define hv_recommend_using_aeoi() \
38+
(!(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED))
3739

3840
#define hv_get_crash_ctl(val) \
3941
rdmsrl(HV_X64_MSR_CRASH_CTL, val)

drivers/hv/hv.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,7 @@ void hv_synic_enable_regs(unsigned int cpu)
184184

185185
shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
186186
shared_sint.masked = false;
187-
if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
188-
shared_sint.auto_eoi = false;
189-
else
190-
shared_sint.auto_eoi = true;
191-
187+
shared_sint.auto_eoi = hv_recommend_using_aeoi();
192188
hv_set_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
193189

194190
/* Enable the global synic bit */

0 commit comments

Comments
 (0)