Skip to contentSkip to conversation

x86/hyperv changes for v3.9

GIT PULL Ingo Molnar 1 participant 1 message Feb 19, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-hyperv-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-hyperv-for-linus

HEAD: cb20e5f2c8d6ba7440a32f4d70c0755bceb36e78 x86, hyperv: HYPERV depends on X86_LOCAL_APIC

The biggest change is support for Windows 8's improved hypervisor interrupt model on the Linux Hyper-V guest subsystem code side.

Smallish fixes otherwise.

out-of-topic modifications in x86-hyperv-for-linus:
---------------------------------------------------
drivers/hv/Kconfig # cb20e5f: x86, hyperv: HYPERV depends on X8

Thanks,

Ingo

------------------>
H. Peter Anvin (1):
x86, hyperv: HYPERV depends on X86_LOCAL_APIC

K. Y. Srinivasan (2):
X86: Add a check to catch Xen emulation of Hyper-V
X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts

Olaf Hering (1):
x86: Hyper-V: register clocksource only if its advertised

 arch/x86/include/asm/irq_vectors.h |  4 +--
 arch/x86/include/asm/mshyperv.h    |  4 +++
 arch/x86/kernel/cpu/mshyperv.c     | 54 +++++++++++++++++++++++++++++++++++++-
 arch/x86/kernel/entry_32.S         |  9 ++++++-
 arch/x86/kernel/entry_64.S         |  7 ++++-
 drivers/hv/Kconfig                 |  2 +-
 drivers/xen/events.c               |  7 ++---
 7 files changed, 78 insertions(+), 9 deletions(-)
arch/x86/include/asm/irq_vectors.h +2 -2
index 1508e51..aac5fa6 100644
@@ -109,8 +109,8 @@
 
 #define UV_BAU_MESSAGE			0xf5
 
-/* Xen vector callback to receive events in a HVM domain */
-#define XEN_HVM_EVTCHN_CALLBACK		0xf3
+/* Vector on which hypervisor callbacks will be delivered */
+#define HYPERVISOR_CALLBACK_VECTOR	0xf3
 
 /*
  * Local APIC timer IRQ vector is on a different priority level,
arch/x86/include/asm/mshyperv.h +4 -0
index 79ce568..c2934be 100644
@@ -11,4 +11,8 @@ struct ms_hyperv_info {
 
 extern struct ms_hyperv_info ms_hyperv;
 
+void hyperv_callback_vector(void);
+void hyperv_vector_handler(struct pt_regs *regs);
+void hv_register_vmbus_handler(int irq, irq_handler_t handler);
+
 #endif
arch/x86/kernel/cpu/mshyperv.c +53 -1

79 lines not on this page · raw message

arch/x86/kernel/entry_32.S +8 -1
index 6ed91d9..8831176 100644
@@ -1091,11 +1091,18 @@ ENTRY(xen_failsafe_callback)
 	_ASM_EXTABLE(4b,9b)
 ENDPROC(xen_failsafe_callback)
 
-BUILD_INTERRUPT3(xen_hvm_callback_vector, XEN_HVM_EVTCHN_CALLBACK,
+BUILD_INTERRUPT3(xen_hvm_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
 		xen_evtchn_do_upcall)
 
 #endif	/* CONFIG_XEN */
 
+#if IS_ENABLED(CONFIG_HYPERV)
+
+BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
+	hyperv_vector_handler)
+
+#endif /* CONFIG_HYPERV */
+
 #ifdef CONFIG_FUNCTION_TRACER
 #ifdef CONFIG_DYNAMIC_FTRACE
 
arch/x86/kernel/entry_64.S +6 -1
index cb3c591..048f224 100644
@@ -1454,11 +1454,16 @@ ENTRY(xen_failsafe_callback)
 	CFI_ENDPROC
 END(xen_failsafe_callback)
 
-apicinterrupt XEN_HVM_EVTCHN_CALLBACK \
+apicinterrupt HYPERVISOR_CALLBACK_VECTOR \
 	xen_hvm_callback_vector xen_evtchn_do_upcall
 
 #endif /* CONFIG_XEN */
 
+#if IS_ENABLED(CONFIG_HYPERV)
+apicinterrupt HYPERVISOR_CALLBACK_VECTOR \
+	hyperv_callback_vector hyperv_vector_handler
+#endif /* CONFIG_HYPERV */
+
 /*
  * Some functions should be protected against kprobes
  */
drivers/hv/Kconfig +1 -1
index b38ef6d..64630f1 100644
@@ -2,7 +2,7 @@ menu "Microsoft Hyper-V guest support"
 
 config HYPERV
 	tristate "Microsoft Hyper-V client drivers"
-	depends on X86 && ACPI && PCI
+	depends on X86 && ACPI && PCI && X86_LOCAL_APIC
 	help
 	  Select this option to run Linux as a Hyper-V client operating
 	  system.
drivers/xen/events.c +4 -3
index 74d77df..22f77c5 100644
@@ -1787,7 +1787,7 @@ void xen_callback_vector(void)
 	int rc;
 	uint64_t callback_via;
 	if (xen_have_vector_callback) {
-		callback_via = HVM_CALLBACK_VECTOR(XEN_HVM_EVTCHN_CALLBACK);
+		callback_via = HVM_CALLBACK_VECTOR(HYPERVISOR_CALLBACK_VECTOR);
 		rc = xen_set_callback_via(callback_via);
 		if (rc) {
 			printk(KERN_ERR "Request for Xen HVM callback vector"
@@ -1798,8 +1798,9 @@ void xen_callback_vector(void)
 		printk(KERN_INFO "Xen HVM callback vector for event delivery is "
 				"enabled\n");
 		/* in the restore case the vector has already been allocated */
-		if (!test_bit(XEN_HVM_EVTCHN_CALLBACK, used_vectors))
-			alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, xen_hvm_callback_vector);
+		if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors))
+			alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR,
+					xen_hvm_callback_vector);
 	}
 }
 #else