[libvirt] [PATCH] qemu: Don't use -enable-nesting with qemu 1.2.0+

Since the option doesn't exist. Fixes booting with cpu mode='host-model' and qemu 1.2.0 --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9a4ab7..d691d51 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2162,7 +2162,6 @@ qemuCapsInitQMPBasic(qemuCapsPtr caps) qemuCapsSet(caps, QEMU_CAPS_NODEFCONFIG); qemuCapsSet(caps, QEMU_CAPS_BOOT_MENU); qemuCapsSet(caps, QEMU_CAPS_FSDEV); - qemuCapsSet(caps, QEMU_CAPS_NESTING); qemuCapsSet(caps, QEMU_CAPS_NAME_PROCESS); qemuCapsSet(caps, QEMU_CAPS_DRIVE_READONLY); qemuCapsSet(caps, QEMU_CAPS_SMBIOS_TYPE); -- 1.7.11.7

On 10/20/2012 01:28 PM, Cole Robinson wrote:
Since the option doesn't exist. Fixes booting with cpu mode='host-model' and qemu 1.2.0 --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9a4ab7..d691d51 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2162,7 +2162,6 @@ qemuCapsInitQMPBasic(qemuCapsPtr caps) qemuCapsSet(caps, QEMU_CAPS_NODEFCONFIG); qemuCapsSet(caps, QEMU_CAPS_BOOT_MENU); qemuCapsSet(caps, QEMU_CAPS_FSDEV); - qemuCapsSet(caps, QEMU_CAPS_NESTING);
This passed 'make check', so I'm half-inclined to give ACK. But what hardware were you testing on? Was it one that allows nested virt? None of my ready-access machines allow nested virt, so I'm having a hard time reproducing the scenario, and I wonder if this is a case where older qemu was conditionally exposing the -help output based on what hardware it was running on, and where your patch now causes a regression on hardware that allows nesting. If so, then we still need some way to set the bit when appropriate - did qemu give us a counterpart QMP query-* command that we can use to determine when nested virt is supported by qemu, if we can't blindly assume it is always supported in 1.2.0+? -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 10/20/2012 03:49 PM, Eric Blake wrote:
On 10/20/2012 01:28 PM, Cole Robinson wrote:
Since the option doesn't exist. Fixes booting with cpu mode='host-model' and qemu 1.2.0 --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9a4ab7..d691d51 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2162,7 +2162,6 @@ qemuCapsInitQMPBasic(qemuCapsPtr caps) qemuCapsSet(caps, QEMU_CAPS_NODEFCONFIG); qemuCapsSet(caps, QEMU_CAPS_BOOT_MENU); qemuCapsSet(caps, QEMU_CAPS_FSDEV); - qemuCapsSet(caps, QEMU_CAPS_NESTING);
This passed 'make check', so I'm half-inclined to give ACK. But what hardware were you testing on? Was it one that allows nested virt?
Nowadays any virt CPU should support nested virt AFAIK. None
of my ready-access machines allow nested virt, so I'm having a hard time reproducing the scenario, and I wonder if this is a case where older qemu was conditionally exposing the -help output based on what hardware it was running on, and where your patch now causes a regression on hardware that allows nesting. If so, then we still need some way to set the bit when appropriate - did qemu give us a counterpart QMP query-* command that we can use to determine when nested virt is supported by qemu, if we can't blindly assume it is always supported in 1.2.0+?
In qemu-kvm.git commit 02885019915d7df85b0e8200aa305dfbe2942443 Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon Jun 27 20:19:46 2011 +0200 qemu-kvm: Drop -enable-nesting command line switch As in upstream, this feature can be controlled via -cpu ...,+/-svm. So the command line switch doesn't actually exist in qemu-1.2.0+ which is what qemuCapsInitQMPBasic is supposed to representing. - Cole

On Sun, Oct 21, 2012 at 13:16:35 -0400, Cole Robinson wrote:
On 10/20/2012 03:49 PM, Eric Blake wrote:
On 10/20/2012 01:28 PM, Cole Robinson wrote:
Since the option doesn't exist. Fixes booting with cpu mode='host-model' and qemu 1.2.0 --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9a4ab7..d691d51 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2162,7 +2162,6 @@ qemuCapsInitQMPBasic(qemuCapsPtr caps) qemuCapsSet(caps, QEMU_CAPS_NODEFCONFIG); qemuCapsSet(caps, QEMU_CAPS_BOOT_MENU); qemuCapsSet(caps, QEMU_CAPS_FSDEV); - qemuCapsSet(caps, QEMU_CAPS_NESTING);
In qemu-kvm.git
commit 02885019915d7df85b0e8200aa305dfbe2942443 Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon Jun 27 20:19:46 2011 +0200
qemu-kvm: Drop -enable-nesting command line switch
As in upstream, this feature can be controlled via -cpu ...,+/-svm.
So the command line switch doesn't actually exist in qemu-1.2.0+ which is what qemuCapsInitQMPBasic is supposed to representing.
OK, the QEMU commit message helps a lot. We used -enable-nesting iff svm feature was requested but now when enabling svm is enough, it makes sense that upstream dropped the command line switch completely. ACK Jirka

On 10/22/2012 05:06 AM, Jiri Denemark wrote:
On Sun, Oct 21, 2012 at 13:16:35 -0400, Cole Robinson wrote:
On 10/20/2012 03:49 PM, Eric Blake wrote:
On 10/20/2012 01:28 PM, Cole Robinson wrote:
Since the option doesn't exist. Fixes booting with cpu mode='host-model' and qemu 1.2.0 --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9a4ab7..d691d51 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2162,7 +2162,6 @@ qemuCapsInitQMPBasic(qemuCapsPtr caps) qemuCapsSet(caps, QEMU_CAPS_NODEFCONFIG); qemuCapsSet(caps, QEMU_CAPS_BOOT_MENU); qemuCapsSet(caps, QEMU_CAPS_FSDEV); - qemuCapsSet(caps, QEMU_CAPS_NESTING);
In qemu-kvm.git
commit 02885019915d7df85b0e8200aa305dfbe2942443 Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon Jun 27 20:19:46 2011 +0200
qemu-kvm: Drop -enable-nesting command line switch
As in upstream, this feature can be controlled via -cpu ...,+/-svm.
So the command line switch doesn't actually exist in qemu-1.2.0+ which is what qemuCapsInitQMPBasic is supposed to representing.
OK, the QEMU commit message helps a lot. We used -enable-nesting iff svm feature was requested but now when enabling svm is enough, it makes sense that upstream dropped the command line switch completely.
ACK
Jirka
Thanks Jirka, pushed now. - Cole
participants (3)
-
Cole Robinson
-
Eric Blake
-
Jiri Denemark