summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authordexuan <dexuan@FreeBSD.org>2016-11-30 06:26:37 +0000
committerdexuan <dexuan@FreeBSD.org>2016-11-30 06:26:37 +0000
commit15e1818ea6d3279ebf8da64897a39ba6208c457a (patch)
tree8580910b05905648ae329acf440ecce4ec2ef14e /sys/conf
parent6a086b92bdfc8f8b56d67d90c51ec0d45dfc8547 (diff)
downloadFreeBSD-src-15e1818ea6d3279ebf8da64897a39ba6208c457a.zip
FreeBSD-src-15e1818ea6d3279ebf8da64897a39ba6208c457a.tar.gz
MFC: 308723-308725,308793-308795,309127
Approved by: sephe (mentor) r308723 hyperv/vmbus: add a new method to get vcpu_id vcpu_id is host's representation of guest CPU. We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus driver is loaded. Later, when a driver, like the coming pcib driver, talks to the host and needs to refer to a guest CPU, the driver must use the vcpu_id. Reviewed by: jhb, sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8410 r308724 hyperv/vmbus: add new vmbus methods to support PCIe pass-through The new methods will be used by the coming pcib driver. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8409 r308725 hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment) The feature enables us to pass through physical PCIe devices to FreeBSD VM running on Hyper-V (Windows Server 2016) to get near-native performance with low CPU utilization. The patch implements a PCI bridge driver to support the feature: 1) The pcib driver talks to the host to discover device(s) and presents the device(s) to FreeBSD's pci driver via PCI configuration space (note: to access the configuration space, we don't use the standard I/O port 0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V, which is very similar to the 0xCF8/CFC method). 2) The pcib driver allocates resources for the device(s) and initialize the related BARs, when the device driver's attach method is invoked; 3) The pcib driver talks to the host to create MSI/MSI-X interrupt remapping between the guest and the host; 4) The pcib driver supports device hot add/remove. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8332 r308793 hyperv/pcib: Fix the build for some kernel configs Add the dependency on pci explicitly for the pcib and vmbus drivers. The related Makefiles are updated accordingly too. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308794 hyperv/vmbus,pcib: Add MODULE_DEPEND on pci We'd better add this dependency explicitly, though usually the pci driver is built into the kernel by default. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308795 hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c This makes the file name and the variable naming in the file consistent. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r309127 hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at least shouldn't break build. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files.amd643
-rw-r--r--sys/conf/files.i3863
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index a20292b..db52196 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -261,6 +261,7 @@ dev/hwpmc/hwpmc_uncore.c optional hwpmc
dev/hwpmc/hwpmc_piv.c optional hwpmc
dev/hwpmc/hwpmc_tsc.c optional hwpmc
dev/hwpmc/hwpmc_x86.c optional hwpmc
+dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci
dev/hyperv/netvsc/hn_nvs.c optional hyperv
dev/hyperv/netvsc/hn_rndis.c optional hyperv
dev/hyperv/netvsc/if_hn.c optional hyperv
@@ -272,7 +273,7 @@ dev/hyperv/utilities/hv_timesync.c optional hyperv
dev/hyperv/utilities/hv_util.c optional hyperv
dev/hyperv/vmbus/hyperv.c optional hyperv
dev/hyperv/vmbus/hyperv_busdma.c optional hyperv
-dev/hyperv/vmbus/vmbus.c optional hyperv
+dev/hyperv/vmbus/vmbus.c optional hyperv pci
dev/hyperv/vmbus/vmbus_br.c optional hyperv
dev/hyperv/vmbus/vmbus_chan.c optional hyperv
dev/hyperv/vmbus/vmbus_et.c optional hyperv
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 72913e6..eb3cf41 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -238,6 +238,7 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc
dev/hwpmc/hwpmc_ppro.c optional hwpmc
dev/hwpmc/hwpmc_tsc.c optional hwpmc
dev/hwpmc/hwpmc_x86.c optional hwpmc
+dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci
dev/hyperv/netvsc/hn_nvs.c optional hyperv
dev/hyperv/netvsc/hn_rndis.c optional hyperv
dev/hyperv/netvsc/if_hn.c optional hyperv
@@ -249,7 +250,7 @@ dev/hyperv/utilities/hv_timesync.c optional hyperv
dev/hyperv/utilities/hv_util.c optional hyperv
dev/hyperv/vmbus/hyperv.c optional hyperv
dev/hyperv/vmbus/hyperv_busdma.c optional hyperv
-dev/hyperv/vmbus/vmbus.c optional hyperv
+dev/hyperv/vmbus/vmbus.c optional hyperv pci
dev/hyperv/vmbus/vmbus_br.c optional hyperv
dev/hyperv/vmbus/vmbus_chan.c optional hyperv
dev/hyperv/vmbus/vmbus_et.c optional hyperv
OpenPOWER on IntegriCloud