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-devel

[Xen-devel] PCI passthrough of multiple devices to HVM guest using stub

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] PCI passthrough of multiple devices to HVM guest using stub domain not working
From: Jason Sonnek <jsonnek@xxxxxxxxx>
Date: Wed, 16 Feb 2011 11:19:39 -0600
Delivery-date: Wed, 16 Feb 2011 09:21:28 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=29SMDrgUHGRZpk26auLSAoDyePJt2Wq7XmJRMytS8IM=; b=dGedVaF/v2qXT0P3gwzVunw19w2PUS12HbIg/sC2QmVV3lgHZgLg/xyXdurrnXBkhU j8F85DC6pTvzI7KtzDKBdD6XH21BIBl0vBpL9bE6Zhjwsv3XYVJmR/XsxC9yGOKruZVw Pq6zXzUo8da4PkdeG5iz2M2bdTwjOp5hwR6rU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=iuqh/o1Pv8acH7qK/RDsjS/MQst94ec4kIlQb60MIv3Au3wV67/wGHwsp+hMa7QnBe KC1NUAIImz8z4ygeF2M0tESj6iWzxLdP7Cvf/4Ayc5jWW/RJlQZcHjEBygCkoftUP6NI Ge2gWtbNtN4HJmJ+XR9Ynqi5JJxWQLeoVUBjM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Only the first function of the first device that I pass-through to an
HVM guest using a stub domain successfully registers. If the first
device in the "pci=[....]" line in the configuration file has a single
function, the guest will boot and the first device will be
passed-through successfully, but only none of the devices listed after
the first will work. If the first device in the configuration file has
multiple functions, the guest will hang during start-up.

I'm using Xen 4.0.1 / pv_ops 2.6.32.25 Dom0. Works fine using qemu-dm
in Dom0 instead of stubdom-dm. I've tested this with multiple devices.

Here's an excerpt from the QEMU log showing successful registration of
the first function of a device and failure of the second:

xs_read_watch() -> /local/domain/0/device-model/75/command dm-command
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 08:00.0 ...
open(/sys/bus/pci/devices/0000:08:00.0/resource, 0)pt_libpci_fixup:
Error: Can't open /sys/bus/pci/devices/0000:08:00.0/resource: I/O
error
register_real_device: Enable MSI translation via per device option
register_real_device: Disable power management
stat(/sys/bus/pci/devices/0000:08:00.0/physfn)
warning: pt_iomul not supported in stubdom 08:00.0
pt_register_regions: IO region registered (size=0x00020000 base_addr=0xf9600000)
pt_register_regions: IO region registered (size=0x00000020 base_addr=0x0000bf80)
pt_register_regions: IO region registered (size=0x00004000 base_addr=0xf9640000)
pt_msix_init: get MSI-X table bar base f9640000
open(/dev/mem) -> 12
pt_msix_init: table_off = 0, total_entries = 10
pt_msix_init: errno = 5
close(12)
pt_msix_init: mapping physical MSI-X table to 2807000
pt_msi_setup: Error: Mapping of MSI failed.
pt_enable_msi_translate: Error: MSI-INTx translation MSI setup failed, fallback
pci_intx: intx=1
register_real_device: Real physical device 08:00.0 registered successfuly!
IRQ type = INTx
xs_read_watch() -> /local/domain/0/device-model/75/command dm-command
xs_read(/local/domain/0/device-model/75/command): ENOENT
pcifront_watches: backend state changed:
/local/domain/0/backend/pci/76/0/state 7
pcifront_watches: writing device/pci/0/state 7
pcifront_watches: backend state changed:
/local/domain/0/backend/pci/76/0/state 5
pcifront_watches: done waiting
close pci: backend at /local/domain/0/backend/pci/76/0
xs_read_watch() -> /local/domain/0/device-model/75/command dm-command
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 08:00.1 ...
register_real_device: Error: couldn't locate device in libpci structures
xs_read_watch() -> /local/domain/0/device-model/75/command dm-command
xs_read(/local/domain/0/device-model/75/command): ENOENT



Any suggestions/assistance greatly appreciated.

Jason

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>