summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
authorMichael Kelley <mikelley@microsoft.com>2021-03-03 00:38:17 +0300
committerWei Liu <wei.liu@kernel.org>2021-03-08 20:32:59 +0300
commit946f4b8680b8ad177f6489e023a1d95e82d502e2 (patch)
treea6666cd372480c9c0eec0e37ecb0d7e48a883bdc /drivers/hv
parentb548a7742791e7818bc2780b2354b9714fd8f8d9 (diff)
downloadlinux-946f4b8680b8ad177f6489e023a1d95e82d502e2.tar.xz
Drivers: hv: vmbus: Handle auto EOI quirk inline
On x86/x64, Hyper-V provides a flag to indicate auto EOI functionality, but it doesn't on ARM64. Handle this quirk inline instead of calling into code under arch/x86 (and coming, under arch/arm64). No functional change. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/1614721102-2241-6-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 0c1fa69381f7..afe7a62b447f 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -219,7 +219,17 @@ void hv_synic_enable_regs(unsigned int cpu)
shared_sint.vector = hv_get_vector();
shared_sint.masked = false;
- shared_sint.auto_eoi = hv_recommend_using_aeoi();
+
+ /*
+ * On architectures where Hyper-V doesn't support AEOI (e.g., ARM64),
+ * it doesn't provide a recommendation flag and AEOI must be disabled.
+ */
+#ifdef HV_DEPRECATING_AEOI_RECOMMENDED
+ shared_sint.auto_eoi =
+ !(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED);
+#else
+ shared_sint.auto_eoi = 0;
+#endif
hv_set_register(HV_REGISTER_SINT0 + VMBUS_MESSAGE_SINT,
shared_sint.as_uint64);