* [PATCH 0/2] Drivers: hv: Support vAPIC
@ 2017-03-15 1:01 kys
2017-03-15 1:01 ` [PATCH 1/2] Drivers: hv: Fix a typo kys
2017-03-15 1:01 ` [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints kys
0 siblings, 2 replies; 3+ messages in thread
From: kys @ 2017-03-15 1:01 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
leann.ogasawara, marcelo.cerri
Cc: K. Y. Srinivasan
From: K. Y. Srinivasan <kys@microsoft.com>
Enable autoeoi based on the hypervisor recommendations.
This is required to support vAPIC.
K. Y. Srinivasan (2):
Drivers: hv: Fix a typo
Drivers: hv: Base autoeoi enablement based on hypervisor hints
arch/x86/include/uapi/asm/hyperv.h | 7 ++++++-
drivers/hv/hv.c | 5 ++++-
2 files changed, 10 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] Drivers: hv: Fix a typo
2017-03-15 1:01 [PATCH 0/2] Drivers: hv: Support vAPIC kys
@ 2017-03-15 1:01 ` kys
2017-03-15 1:01 ` [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints kys
1 sibling, 0 replies; 3+ messages in thread
From: kys @ 2017-03-15 1:01 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
leann.ogasawara, marcelo.cerri
Cc: K. Y. Srinivasan
From: K. Y. Srinivasan <kys@microsoft.com>
Fix a typo in the macro.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
arch/x86/include/uapi/asm/hyperv.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index 3a20ccf..32ea7a3 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -124,7 +124,7 @@
* Recommend using hypercall for address space switches rather
* than MOV to CR3 instruction
*/
-#define HV_X64_MWAIT_RECOMMENDED (1 << 0)
+#define HV_X64_AS_SWITCH_RECOMMENDED (1 << 0)
/* Recommend using hypercall for local TLB flushes rather
* than INVLPG or MOV to CR3 instructions */
#define HV_X64_LOCAL_TLB_FLUSH_RECOMMENDED (1 << 1)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints
2017-03-15 1:01 [PATCH 0/2] Drivers: hv: Support vAPIC kys
2017-03-15 1:01 ` [PATCH 1/2] Drivers: hv: Fix a typo kys
@ 2017-03-15 1:01 ` kys
1 sibling, 0 replies; 3+ messages in thread
From: kys @ 2017-03-15 1:01 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
leann.ogasawara, marcelo.cerri
Cc: K. Y. Srinivasan
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-15 1:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 1:01 [PATCH 0/2] Drivers: hv: Support vAPIC kys
2017-03-15 1:01 ` [PATCH 1/2] Drivers: hv: Fix a typo kys
2017-03-15 1:01 ` [PATCH 2/2] Drivers: hv: Base autoeoi enablement based on hypervisor hints kys
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).