WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 0 of 5] Fix some PCI passthrough bugs

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 0 of 5] Fix some PCI passthrough bugs
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Tue, 12 Jan 2010 22:57:00 +0000
Delivery-date: Tue, 12 Jan 2010 15:03:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Fix a number of issues with the (experimental) PCI passthrough code

* automatically add the '-priv' cmdline argument to qemu-dm if a PCI device is 
to be passed through. This prevents the deprivving which prevents qemu from 
reading /sys
* call Device.PCI.bind to unbind the device from a dom0 driver and give it to 
pciback in the hotplug path (we already did this in the coldplug path)
* move the RBAC permissions check to the point where the user config is read 
from VM.other_config. In the reboot path use the existing configuration read 
from xenstore rather than fresh configuration (NB without this the RBAC check 
would prevent any PCI device being passed through on reboot because the session 
doesn't have the privilege. NB giving the internal reboot thread the privilege 
would allow any VM_OPERATOR to pass through PCI devices = bad)
* call the plug_pcidevs function on reboot: previously this was just missing.
* when multiple devices are hotplugged use different dev-X xenstore keys (!)

Smoke-tested by passing through 2 VFs of an SR-IOV NIC (on a box with iommu=1) 
to a linux HVM guest, checking the devices appeared, rebooting the guest, 
checking again.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

6 files changed, 88 insertions(+), 63 deletions(-)
ocaml/xapi/vmops.ml           |   76 ++++++++++++++++++++++-------------------
ocaml/xapi/xapi_vm.ml         |   14 +++++--
ocaml/xapi/xapi_vm_migrate.ml |    2 -
ocaml/xenops/device.ml        |   57 ++++++++++++++++++------------
ocaml/xenops/device.mli       |    1 
ocaml/xenops/xenops.ml        |    1 

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api