[libvirt] Xen 4.0 and DPCI key in sexpr

Matthias Bolte matthias.bolte at googlemail.com
Thu Jun 3 23:54:40 UTC 2010


This blog post [1] explains how to apply some OpenSuse patches [2]
(especially xen-domctl-ver7.patch) to the libvirt 0.8.1 Debian package
in order to get Xen 4.0 support.

On IRC jonnyt reported problems with PCI passthrough in such a setup.
Debugging and XenD hacking revealed that XenD 4.0 extended the sexpr
format for PCI devices from

   (device (pci (dev (domain 0x0000)(bus 0x02)(slot 0x00)(func 0x0))))

to this, including a new key part

   (device (pci (dev (domain 0x0000)(bus 0x02)(slot 0x00)(func
0x0)(key <whatever-value-xend-expects-here>))))

The Xen upstream commit [3] that added this doesn't explain much about it.

I came up with the attached prove-of-concept patch that just hardcodes
(key 0x0) for XenD 4.0.

On IRC jonnyt confirmed that this patch fixes the immediate error for him:

   error : xend_post:434 : POST operation failed: xend_post: error
from xen daemon: (xend.err "Error creating domain: 'key'")

Matthias

[1] http://spblinux.de/blog/2010/05/xen-4-0-with-libvirt-0-8-1-replace-xm-new-by-virsh/
[2] https://build.opensuse.org/stage/package/files?package=libvirt&project=Virtualization
[3] http://lists.xensource.com/archives/html/xen-changelog/2009-06/msg00298.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xen4_dpci_key.diff
Type: text/x-diff
Size: 4935 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100604/74cfdd71/attachment-0001.bin>


More information about the libvir-list mailing list