diff options
author | dexuan <dexuan@FreeBSD.org> | 2016-11-30 06:20:43 +0000 |
---|---|---|
committer | dexuan <dexuan@FreeBSD.org> | 2016-11-30 06:20:43 +0000 |
commit | 93e1e35ef2f30ec3ae26cabc2e61c96dd2f91582 (patch) | |
tree | e587806b3b2baeed3e1ff946ecca7da2d69123dc /sys/conf | |
parent | f9912752d5f0359cb887482e286b10ab334bb8ce (diff) | |
download | FreeBSD-src-93e1e35ef2f30ec3ae26cabc2e61c96dd2f91582.zip FreeBSD-src-93e1e35ef2f30ec3ae26cabc2e61c96dd2f91582.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.amd64 | 3 | ||||
-rw-r--r-- | sys/conf/files.i386 | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index bfb6760..51a3f59 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -292,6 +292,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 @@ -303,7 +304,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 5058fc2..f60ac79 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -249,6 +249,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 @@ -260,7 +261,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 |