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...
[2]
https://build.opensuse.org/stage/package/files?package=libvirt&projec...
[3]
http://lists.xensource.com/archives/html/xen-changelog/2009-06/msg00298.html