]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Revert "qemu: detect multi-head qxl via more than version check"
authorEric Blake <eblake@redhat.com>
Fri, 15 Mar 2013 18:22:59 +0000 (12:22 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 25 Mar 2013 14:38:35 +0000 (08:38 -0600)
This reverts commit 5ac846e42e5b7e0475f6aa9cc1e0b0c8dac84d44.

After further discussions with Alon Levy, I learned the following:

The use of '-vga qxl' vs. '-device qxl-vga' is completely orthogonal
to whether ram_size can be exposed.  Downstream distros are interested
in backporting support for multi-head qxl, but this can be done in
one of two ways:
1. Support one head per PCI device.  If you do this, then it makes
sense to have full control over the PCI address of each device. For
full control, you need '-device qxl-vga' instead of '-vga qxl'.
2. Support multiple heads through a single PCI device.  If you do
this, then you need to allocate more RAM to that PCI device (enough
ram to cover the multiple screens).  Here, the device is hard-coded
to 0:0:2.0, both in qemu and libvirt code.

Apparently, backporting ram_size changes to allow multiple heads in
a single device is much easier than backporting multiple device
support.  Furthermore, the presence or absence of qxl-vga.surfaces
is no different than the presence or absence of qxl-vga.ram_size;
both properties can be applied regardless of whether you have one
PCI device (-vga qxl) or multiple (-device qxl-vga), so this property
is NOT a good witness of whether '-device qxl-vga' support has been
backported.

Downstream RHEL will NOT be using this patch; and worse, leaving this
patch in risks doing the wrong thing if compiling upstream libvirt
on RHEL, so the best course of action is to revert it.  That means
that libvirt will go back to only using '-device qxl-vga' for qemu
>= 1.2, but this is just fine because we know of no distros that plan
on backporting multiple PCI address support to any older version of
qemu.  Meanwhile, downstream can still use ram_size to pack multiple
heads through a single PCI device.

src/qemu/qemu_capabilities.c
tests/qemuhelpdata/qemu-1.2.0-device
tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel62-beta-device
tests/qemuhelpdata/qemu-kvm-1.2.0-device

index 3840b418dae11e63f566a16392c091b5fe923464..861d3c43cce361741bb4b84cc071d544452a0da4 100644 (file)
@@ -1393,10 +1393,6 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUsbHost[] = {
     { "bootindex", QEMU_CAPS_USB_HOST_BOOTINDEX },
 };
 
-static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQxlVga[] = {
-    { "surfaces", QEMU_CAPS_DEVICE_VIDEO_PRIMARY },
-};
-
 struct virQEMUCapsObjectTypeProps {
     const char *type;
     struct virQEMUCapsStringFlags *props;
@@ -1430,8 +1426,6 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbRedir) },
     { "usb-host", virQEMUCapsObjectPropsUsbHost,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbHost) },
-    { "qxl-vga", virQEMUCapsObjectPropsQxlVga,
-      ARRAY_CARDINALITY(virQEMUCapsObjectPropsQxlVga) },
 };
 
 
@@ -1629,7 +1623,6 @@ virQEMUCapsExtractDeviceStr(const char *qemu,
                          "-device", "usb-redir,?",
                          "-device", "ide-drive,?",
                          "-device", "usb-host,?",
-                         "-device", "qxl-vga,?",
                          NULL);
     /* qemu -help goes to stdout, but qemu -device ? goes to stderr.  */
     virCommandSetErrorBuffer(cmd, &output);
index 027d99a2d1d2418ac88cca81bbd18a61fc3342ee..5613e00a154badcd62ff3b631b013281a9e42426 100644 (file)
@@ -208,19 +208,3 @@ usb-host.bootindex=int32
 usb-host.pipeline=on/off
 usb-host.port=string
 usb-host.full-path=on/off
-qxl-vga.ram_size=uint32
-qxl-vga.vram_size=uint32
-qxl-vga.revision=uint32
-qxl-vga.debug=uint32
-qxl-vga.guestdebug=uint32
-qxl-vga.cmdlog=uint32
-qxl-vga.ram_size_mb=uint32
-qxl-vga.vram_size_mb=uint32
-qxl-vga.vram64_size_mb=uint32
-qxl-vga.vgamem_mb=uint32
-qxl-vga.surfaces=int32
-qxl-vga.addr=pci-devfn
-qxl-vga.romfile=string
-qxl-vga.rombar=uint32
-qxl-vga.multifunction=on/off
-qxl-vga.command_serr_enable=on/off
index 5eab5392452e645f6406902657d7f39b98d6d0d4..ee0fd78bfdd99c0ad66a12e9e9fdc37c0ed16981 100644 (file)
@@ -118,13 +118,3 @@ virtio-net-pci.addr=pci-devfn
 virtio-net-pci.romfile=string
 virtio-net-pci.rombar=uint32
 virtio-net-pci.multifunction=on/off
-qxl-vga.ram_size=uint32
-qxl-vga.vram_size=uint32
-qxl-vga.revision=uint32
-qxl-vga.debug=uint32
-qxl-vga.guestdebug=uint32
-qxl-vga.cmdlog=uint32
-qxl-vga.addr=pci-devfn
-qxl-vga.romfile=string
-qxl-vga.rombar=uint32
-qxl-vga.multifunction=on/off
index ebc27f07158b9eba830746c61dc440ad4f083151..879a04959e50c3c1e18cfa8702ef19a1364acff7 100644 (file)
@@ -220,19 +220,3 @@ usb-host.bootindex=int32
 usb-host.pipeline=on/off
 usb-host.port=string
 usb-host.full-path=on/off
-qxl-vga.ram_size=uint32
-qxl-vga.vram_size=uint32
-qxl-vga.revision=uint32
-qxl-vga.debug=uint32
-qxl-vga.guestdebug=uint32
-qxl-vga.cmdlog=uint32
-qxl-vga.ram_size_mb=uint32
-qxl-vga.vram_size_mb=uint32
-qxl-vga.vram64_size_mb=uint32
-qxl-vga.vgamem_mb=uint32
-qxl-vga.surfaces=int32
-qxl-vga.addr=pci-devfn
-qxl-vga.romfile=string
-qxl-vga.rombar=uint32
-qxl-vga.multifunction=on/off
-qxl-vga.command_serr_enable=on/off