[libvirt] [PATCH v3 3/4] qemu: use newer -device video device in qemu commandline
Eric Blake
eblake at redhat.com
Thu Dec 13 23:09:58 UTC 2012
On 12/13/2012 02:06 AM, Guannan Ren wrote:
> '-device VGA' maps to '-vga std'
> '-device cirrus-vga' maps to '-vga cirrus'
> '-device qxl-vga' maps to '-vga qxl'
> (there is also '-device qxl' for secondary devices)
> '-device vmware-svga' maps to '-vga vmware'
>
> For qemu(>=1.2), we can use -device to replace -vga for video
> device. For the primary video device, the patch trys to use 0x2
s/trys/tries/
> slot for matching old qemu. If the 0x2 slot is allocated already,
> the addr property could help for using any available slot.
> For qemu(< 1.2), we keep using -vga for primary device.
> ---
> src/qemu/qemu_command.c | 178 +++++++++++++++++++++++++++++++++--------------
> src/qemu/qemu_command.h | 4 +-
> tests/qemuxml2argvtest.c | 9 ++-
> 3 files changed, 136 insertions(+), 55 deletions(-)
>
> +qemuAssignDevicePCISlots(virDomainDefPtr def,
> + qemuCapsPtr caps,
> + qemuDomainPCIAddressSetPtr addrs)
> {
> size_t i, j;
> bool reservedIDE = false;
> bool reservedUSB = false;
> int function;
> + bool qemuDeviceVideoUsable = qemuCapsGet(caps, QEMU_CAPS_1DOT20_PLUS);
This will need to change based on the rename in 1/4.
> @@ -6433,22 +6483,42 @@ qemuBuildCommandLine(virConnectPtr conn,
> goto error;
> }
> if (def->nvideos > 0) {
> - if (qemuCapsGet(caps, QEMU_CAPS_VGA)) {
> - if (def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_XEN) {
> + int primaryVideoType = def->videos[0]->type;
> + if (qemuCapsGet(caps, QEMU_CAPS_1DOT20_PLUS) &&
and another place.
The rest of this seems reasonable.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121213/10072829/attachment-0001.sig>
More information about the libvir-list
mailing list