Page MenuHomeFreeBSD

D30577.diff
No OneTemporary

D30577.diff

diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -102,7 +102,6 @@
dev/glxsb/glxsb.c optional glxsb
dev/glxsb/glxsb_hash.c optional glxsb
dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv
-dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv
dev/le/if_le_isa.c optional le isa
dev/nctgpio/nctgpio.c optional nctgpio
dev/nfe/if_nfe.c optional nfe pci
diff --git a/sys/conf/options.i386 b/sys/conf/options.i386
--- a/sys/conf/options.i386
+++ b/sys/conf/options.i386
@@ -101,6 +101,9 @@
# BPF just-in-time compiler
BPF_JITTER opt_bpf.h
+# Hyper-V support
+HYPERV opt_hyperv.h
+
XENHVM opt_global.h
# options for the Intel C600 SAS driver (isci)
diff --git a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S
--- a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S
+++ b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S
@@ -35,6 +35,9 @@
/*
* This is the Hyper-V vmbus channel direct callback interrupt.
* Only used when it is running on Hyper-V.
+ *
+ * Note that this file is not compiled directly, it is included into
+ * i386/exception.s.
*/
.text
SUPERALIGN_TEXT
@@ -45,6 +48,7 @@
cld
KENTER
pushl %esp
- call vmbus_handle_intr
+ mov $vmbus_handle_intr, %eax
+ call *%eax
add $4, %esp
jmp doreti
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -339,7 +339,9 @@
device virtio_balloon # VirtIO Memory Balloon device
# HyperV drivers and enhancement support
-device hyperv # HyperV drivers
+# NOTE: HYPERV depends on hyperv. They must be added or removed together.
+options HYPERV # Kernel support for HyperV drivers
+device hyperv # HyperV drivers
# Xen HVM Guest Optimizations
# NOTE: XENHVM depends on xenpci. They must be added or removed together.
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s
--- a/sys/i386/i386/exception.s
+++ b/sys/i386/i386/exception.s
@@ -39,6 +39,7 @@
#include "opt_apic.h"
#include "opt_atpic.h"
#include "opt_hwpmc_hooks.h"
+#include "opt_hyperv.h"
#include "assym.inc"
@@ -404,6 +405,14 @@
#ifdef DEV_APIC
#include <i386/i386/apic_vector.s>
+#endif
+
+#ifdef HYPERV
+ .data
+ .p2align 4
+ .text
+ SUPERALIGN_TEXT
+#include <dev/hyperv/vmbus/i386/vmbus_vector.S>
#endif
.data
diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile
--- a/sys/modules/hyperv/vmbus/Makefile
+++ b/sys/modules/hyperv/vmbus/Makefile
@@ -13,8 +13,11 @@
vmbus_et.c \
vmbus_if.c \
vmbus_res.c \
- vmbus_vector.S \
vmbus_xact.c
+
+.if ${MACHINE_CPUARCH} != "i386"
+SRCS+= vmbus_vector.S
+.endif
SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h
# XXX: for assym.inc

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 4:42 PM (12 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15606033
Default Alt Text
D30577.diff (2 KB)

Event Timeline