提交 7524cd89 编写于 作者: E Eric Blake

Revert "qemu: detect multi-head qxl via more than version check"

This reverts commit 5ac846e4.

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.
上级 7c12055d
......@@ -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);
......
......@@ -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
......@@ -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
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册