qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20150414142507.GI4131@wheatley
A message that is not in the archive (sent off-list or not yet received): CAJ+F1CKrdygm-Dkhpsq06yHjM4ampZb1sBeJV-b2HJOgJCmRrA@mail.gmail.com
[adding qemu]
Quoted 16 lines · Marc-André Lureau
Hi
Quoted 3 lines · Martin Kletzander
Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)?
That works with the following change:
src/qemu/qemu_capabilities.c +0
-0
src/qemu/qemu_capabilities.c struct virQEMUCapsCommandLineProps { · line 2513
Quoted 4 lines
src/qemu/qemu_capabilities.c +1
-0@@ -2510,6 +2510,7 @@ struct virQEMUCapsCommandLineProps {static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { {"machine" ,"mem-merge" ,QEMU_CAPS_MEM_MERGE }, + {"machine" ,"vmport" ,QEMU_CAPS_MACHINE_VMPORT_OPT },
Ouch. qemu commit 0a7cf21 fixes what would have been a regression in 2.3 at exposing "mem-merge" through query-command-line-options, but it does NOT expose "vmport", which is a per-architecture option rather than a generic -machine option. Which means that even though qemu 2.2 (perhaps wrongly) advertised "vmport" for all machines (even when it was not supported), 2.3 will not advertise it, and we are hoping for a better solution in 2.4 for properly advertising vmport on an as-appropriate basis.
Yes, we WANT to use QMP probing,...
src/qemu/qemu_capabilities.c virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, · line 3248
Quoted 10 lines
src/qemu/qemu_capabilities.c +0
-3{ "drive", "discard", QEMU_CAPS_DRIVE_DISCARD }, { "realtime", "mlock", QEMU_CAPS_MLOCK }, { "boot-opts", "strict", QEMU_CAPS_BOOT_STRICT },@@ -3243,10 +3244,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,if (qemuCaps->version >=1003000 )virQEMUCapsSet (qemuCaps,QEMU_CAPS_MACHINE_USB_OPT ); -/* vmport option is supported v2.2.0 onwards */ -if (qemuCaps->version >=2002000 ) -virQEMUCapsSet (qemuCaps,QEMU_CAPS_MACHINE_VMPORT_OPT );
...and not version comparison, but we'll need something better in QMP for 2.3 (which is rather late, since we missed 2.3-rc3) if you can't come up with anything better for learning whether vmport is supported.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 42 lines · Eric Blake
[adding qemu]
Quoted 16 lines · Marc-André Lureau
Hi
Quoted 3 lines · Martin Kletzander
Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)?
That works with the following change:
src/qemu/qemu_capabilities.c +0
-0src/qemu/qemu_capabilities.c struct virQEMUCapsCommandLineProps { · line 2513
Quoted 4 lines
src/qemu/qemu_capabilities.c +1
-0@@ -2510,6 +2510,7 @@ struct virQEMUCapsCommandLineProps {static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { {"machine" ,"mem-merge" ,QEMU_CAPS_MEM_MERGE }, + {"machine" ,"vmport" ,QEMU_CAPS_MACHINE_VMPORT_OPT },Ouch. qemu commit 0a7cf21 fixes what would have been a regression in 2.3 at exposing "mem-merge" through query-command-line-options, but it does NOT expose "vmport", which is a per-architecture option rather than a generic -machine option. Which means that even though qemu 2.2 (perhaps wrongly) advertised "vmport" for all machines (even when it was not supported), 2.3 will not advertise it, and we are hoping for a better solution in 2.4 for properly advertising vmport on an as-appropriate basis.
Yes, we WANT to use QMP probing,...
Quoted 7 lines
src/qemu/qemu_capabilities.c +0
-0{ "drive", "discard", QEMU_CAPS_DRIVE_DISCARD }, { "realtime", "mlock", QEMU_CAPS_MLOCK }, { "boot-opts", "strict", QEMU_CAPS_BOOT_STRICT },@@ -3243,10 +3244,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,if (qemuCaps->version >=1003000 )virQEMUCapsSet (qemuCaps,QEMU_CAPS_MACHINE_USB_OPT );
Quoted 8 lines
src/qemu/qemu_capabilities.c virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, · line 3248
Quoted 3 lines
src/qemu/qemu_capabilities.c +0
-3-/* vmport option is supported v2.2.0 onwards */ -if (qemuCaps->version >=2002000 ) -virQEMUCapsSet (qemuCaps,QEMU_CAPS_MACHINE_VMPORT_OPT );...and not version comparison, but we'll need something better in QMP for 2.3 (which is rather late, since we missed 2.3-rc3) if you can't come up with anything better for learning whether vmport is supported.
Ouch, I missed that. But that's something we need for more than just vmport attribute, but also all other machine-specific ones :(
I still think this might go in, though.
Hi
Quoted 11 lines · Eric Blake
Quoted 1 line
+ { "machine", "vmport",
QEMU_CAPS_MACHINE_VMPORT_OPT},Ouch. qemu commit 0a7cf21 fixes what would have been a regression in 2.3 at exposing "mem-merge" through query-command-line-options, but it does NOT expose "vmport", which is a per-architecture option rather than a generic -machine option. Which means that even though qemu 2.2 (perhaps wrongly) advertised "vmport" for all machines (even when it was not supported), 2.3 will not advertise it, and we are hoping for a better solution in 2.4 for properly advertising vmport on an as-appropriate basis.
Thanks Eric for finding out this regression.
Is anybody working on a better solution? I can imagine either a new qmp machine-list-properties, or perhaps more reasonably a new properties array in query-machines reply.
Signature · 1 line
Marc-André Lureau
Quoted 16 lines · Marc-André Lureau
Hi
Quoted 11 lines · Eric Blake
Quoted 2 lines
+ { "machine", "vmport",
QEMU_CAPS_MACHINE_VMPORT_OPT},Ouch. qemu commit 0a7cf21 fixes what would have been a regression in 2.3 at exposing "mem-merge" through query-command-line-options, but it does NOT expose "vmport", which is a per-architecture option rather than a generic -machine option. Which means that even though qemu 2.2 (perhaps wrongly) advertised "vmport" for all machines (even when it was not supported), 2.3 will not advertise it, and we are hoping for a better solution in 2.4 for properly advertising vmport on an as-appropriate basis.
Quoted 5 lines
Thanks Eric for finding out this regression.
Is anybody working on a better solution? I can imagine either a new qmp machine-list-properties, or perhaps more reasonably a new properties array in query-machines reply.
Unless this is an absolutely critical "we cannot ship 2.3 without a fix" bug (in which case somebody should yell now and you really need a patch on the list within a day or so), you've probably missed the 2.3 boat at this point.
-- PMM