Add support for a ram_size parameter similar to the current support for vram_size.
Rationale: To allow a compatible performance of a single pci device using the new multiple monitor support to the old multiple pci card solution, we need to be able to set the memory of the ram bar to larger then the default size. We can already do the same to the vram bar (second bar) because the support was added by:
2011-03-06 Osier Yang <email@example.com>
qemu: Support vram for video of qxl type
related: #894350 PRD32 - [RFE] qxl device should support multiple monitors
v2 is awaiting review here: https://www.redhat.com/archives/libvir-list/2013-January/msg01367.html
Fixed upstream with:
Author: Alon Levy <firstname.lastname@example.org>
Date: Fri Jan 18 20:36:36 2013 +0200
qemu: Support ram bar size for qxl devices
Adds a "ram" attribute globally to the video.model element, that changes
the resulting qemu command line only if video.type == "qxl".
<model type='qxl' ram='65536' vram='65536' heads='1'/>
That attribute gets a default value of 64*1024. The schema is unchanged
for other video element types.
The resulting qemu command line change is the addition of
For the main and secondary qxl devices respectively.
The default for the qxl ram bar is 64*1024 kilobytes (the same as the
default qxl vram bar size).
I'll cover the backport
It turns out that backporting just this patch in isolation doesn't make sense; I'm instead working on backporting all the patches related to multi-monitor qxl support:
632c60e qemu: Detect VGA_QXL capability correctly
ed6fc41 tests: add one -device video device testcase
aa51202 qemu: use newer -device video device in qemu commandline
09938bb conf: add optional attribte primary to video <model> element
4c993d8 qemu: add qemu vga devices caps and one cap to mark them usable
Hmm, the upstream patches set a capability based solely on a version check:
+ if (version >= 1002000)
+ qemuCapsSet(caps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
This series may need to include a RHEL-specific patch that scrapes some additional string out of -help output in order to set that capability even when targeting RHEL's 0.12.x version number.
Although the bulk of this patch is picked up by rebasing, we need a RHEL-only patch to round it out:
Moving back to assigned - based on discussion on 915352, upstream libvirt should be probing for qxl-vga.surfaces instead of a hard-coded version check for 1.2; we should backport that patch instead of a RHEL-specific patch. Meanwhile, I will clone this back to qemu, to make sure RHEL qemu exposes qxl-vga.surfaces.
Upstream patch proposed:
Back in POST; next rebase will pick up:
Author: Eric Blake <email@example.com>
Date: Wed Mar 13 18:41:22 2013 -0600
qemu: detect multi-head qxl via more than version check
Multi-head QXL support is so useful that distros have started to
backport it to qemu earlier than 1.2. After discussion with
Alon Levy, we determined that the existence of the qxl-vga.surfaces
property is a reliable indicator of whether '-device qxl-vga' works,
or whether we have to stick to the older '-vga qxl'. I'm leaving
in the existing check for QEMU_CAPS_DEVICE_VIDEO_PRIMARY tied to
qemu 1.2 and newer (in case qemu is built without qxl support),
but for those distros that backport qxl, this additional capability
check will allow the correct command line for both RHEL 6.3 (which
lacks the feature) and RHEL 6.4 (where qemu still claims to be
version 0.12.2.x, but has backported multi-head qxl).
* src/qemu/qemu_capabilities.c (virQEMUCapsObjectPropsQxlVga): New
(virQEMUCapsExtractDeviceStr): Probe for backport of new
capability to qemu earlier than 1.2.
* tests/qemuhelpdata/qemu-kvm-1.2.0-device: Update test.
* tests/qemuhelpdata/qemu-1.2.0-device: Likewise.
I can reproduce this bug:
1.prepare a guest with qxl video device.
# virsh dumpxml test
<model type='qxl' vram='65536' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
2. try to add paremeter "ram='65536'" to the video model.
there is no ram in qxl video paremeters.
can't add ram to the xml
As the steps above.
1.step1. the xml have the ram patemeter in the qxl model.
2. can change the size of ram
As the result , change to VERIFIED
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.