[libvirt] [PATCH 1/2] add qemu pci-express device support

Daniel P. Berrange berrange at redhat.com
Wed Jan 9 10:32:51 UTC 2013


On Wed, Jan 09, 2013 at 10:35:32AM +0800, liguang wrote:
> Signed-off-by: liguang <lig.fnst at cn.fujitsu.com>
> ---
>  src/conf/device_conf.c       |    8 +++++++-
>  src/conf/device_conf.h       |    1 +
>  src/qemu/qemu_capabilities.c |   11 +++++++++++
>  src/qemu/qemu_capabilities.h |    1 +
>  src/qemu/qemu_command.c      |    4 +++-
>  5 files changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
> index 7b97f45..3fca853 100644
> --- a/src/conf/device_conf.c
> +++ b/src/conf/device_conf.c
> @@ -51,7 +51,7 @@ int
>  virDevicePCIAddressParseXML(xmlNodePtr node,
>                              virDevicePCIAddressPtr addr)
>  {
> -    char *domain, *slot, *bus, *function, *multi;
> +    char *domain, *slot, *bus, *function, *multi, *expr;
>      int ret = -1;
>  
>      memset(addr, 0, sizeof(*addr));
> @@ -61,6 +61,7 @@ virDevicePCIAddressParseXML(xmlNodePtr node,
>      slot     = virXMLPropString(node, "slot");
>      function = virXMLPropString(node, "function");
>      multi    = virXMLPropString(node, "multifunction");
> +    expr     = virXMLPropString(node, "express");

NACK, this is a gross hack.

The q35 machine type provides multiple PCI buses, and it is
already possible to express connection to the alternative
buses using the 'bus' parameter. We don't need a new 'express'
parameter. We need to make sure that the XML includes a
<controller> element for each PCI bus provided by a machine
type

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list