SR-IOV Patch Series 2/7: bhyve integration

2014-05-26 Thread Ryan Stone
The bhyve work to interoperate is quite simple.  PCI Passthrough
through the ppt driver works just fine with SR-IOV VFs.  The three
changes are:

- allow ppt devices to detach.  This would happen if the administrator
destroyed VFs with iovctl -D
- allow the SR-IOV infrastructure to force the ppt driver to attach to
certain devices by using the special BUS_PROBE_NOWILDCARD return value
from device_probe().  This will have no effect on regular devices, but
the SR-IOV infrastructure can create VF devices in a way where
BUS_PROBE_NOWILDCARD will match the device.  This allows passthrough
of a given VF to be configured through iovctl (see ioctl.conf(5) for
an example of how to do this).
- Currently if vmm.ko is loaded and no ppt devices are present, the
IOMMU is not enabled.  If VFs are subsequently created as passthrough
devices it will not be possible to pass them through to VMs.  This
patch adds a new tunable that will force the IOMMU to be enabled.

Note: Currently ppt suffers from a lack of locking.  This is now a
problem because ppt devices can be destroyed, so there would be races
here.  I tried to address this by adding a mutex but that failed in
ways that I could not figure out how to resolve (basically, some parts
of ppt are called into from within a critical section, so a spinlock
is needed, but other parts of ppt call into the VM subsystem to do
M_WAITOK allocations, so an sx lock is needed.  It wasn't at all
obvious to me how to resolve that conflict, so I'm hoping that a more
experienced bhyve person has an idea).


http://people.freebsd.org/~rstone/patches/iov/0004-Allow-passthrough-devices-to-be-hinted.patch
[PATCH 04/21] Allow passthrough devices to be hinted.

Allow the ppt driver to attach to devices that were hinted to be
passthrough devices by the PCI code creating them with a driver
name of "ppt".

Add a tunable that allows the IOMMU to be forced to be used.  With
SR-IOV passthrough devices the VFs may be created after vmm.ko is
loaded.  The current code will not initialize the IOMMU in that
case, meaning that the passthrough devices can't actually be used.
---
 sys/amd64/vmm/io/ppt.c | 72 +++---
 sys/amd64/vmm/vmm.c|  7 -
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Current problem reports assigned to freebsd-virtualization@FreeBSD.org

2014-05-26 Thread FreeBSD bugmaster
Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.


S Tracker  Resp.  Description

o kern/165252  virtualization[vimage] [pf] [panic] kernel panics with VIMAGE 
and PF
o kern/161094  virtualization[vimage] [pf] [panic] kernel panic with pf + 
VIMAGE wh
o kern/160541  virtualization[vimage][pf][patch] panic: userret: Returning on 
td 0x
o kern/160496  virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE
o kern/148155  virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel 
opt
a kern/147950  virtualization[vimage] [carp] VIMAGE + CARP = kernel crash
s kern/143808  virtualization[pf] pf does not work inside jail

7 problems total.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"