
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