Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600976

[PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints

From kys@exchange.microsoft.com
Newsgroups linux.kernel
Subject [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints
Date 2017-03-15 02:10 +0100
Message-ID <tl5BU-6B-13@gated-at.bofh.it> (permalink)
References <tl5BT-6B-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: K. Y. Srinivasan <kys@microsoft.com>

Don't enable auto-eoi if the hypervisor recommends otherwise. This will
enable vAPIC functionality if available.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 arch/x86/include/uapi/asm/hyperv.h |    5 +++++
 drivers/hv/hv.c                    |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index 32ea7a3..432df4b 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -148,6 +148,11 @@
 #define HV_X64_RELAXED_TIMING_RECOMMENDED	(1 << 5)
 
 /*
+ * Virtual APIC support
+ */
+#define HV_X64_DEPRECATING_AEOI_RECOMMENDED	(1 << 9)
+
+/*
  * Crash notification flag.
  */
 #define HV_CRASH_CTL_CRASH_NOTIFY (1ULL << 63)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 665a64f..12e7bae 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -254,7 +254,10 @@ int hv_synic_init(unsigned int cpu)
 	shared_sint.as_uint64 = 0;
 	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
 	shared_sint.masked = false;
-	shared_sint.auto_eoi = true;
+	if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED)
+		shared_sint.auto_eoi = false;
+	else
+		shared_sint.auto_eoi = true;
 
 	hv_set_synint_state(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,
 			    shared_sint.as_uint64);
-- 
1.7.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Drivers: hv: Support vAPIC  kys@exchange.microsoft.com - 2017-03-15 02:10 +0100
  [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints kys@exchange.microsoft.com - 2017-03-15 02:10 +0100
  [PATCH 1/2] Drivers: hv: Fix a typo kys@exchange.microsoft.com - 2017-03-15 02:10 +0100

csiph-web