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

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 <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200420164926.24471-1-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Michael Kelley and committed by
Wei Liu
2ddddd0b 1a06d017

+3 -5
+2
arch/x86/include/asm/mshyperv.h
··· 34 34 rdmsrl(HV_X64_MSR_SINT0 + int_num, val) 35 35 #define hv_set_synint_state(int_num, val) \ 36 36 wrmsrl(HV_X64_MSR_SINT0 + int_num, val) 37 + #define hv_recommend_using_aeoi() \ 38 + (!(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)) 37 39 38 40 #define hv_get_crash_ctl(val) \ 39 41 rdmsrl(HV_X64_MSR_CRASH_CTL, val)
+1 -5
drivers/hv/hv.c
··· 184 184 185 185 shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR; 186 186 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(); 192 188 hv_set_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64); 193 189 194 190 /* Enable the global synic bit */