Re: [libvirt] [RFC PATCH v3 4/9] qemu: Add capabilities for optional pSeries features

2018-03-06 Thread Andrea Bolognani
On Tue, 2018-03-06 at 11:26 +0530, Shivaprasad bhat wrote:
[...]
> On the contrary, I see query device-list-proprties on spapr-machine
> results in CapsProbeFailure. I tried on both v2.11.1 and v.2.10.2
> 
> 2018-03-06 05:41:16.201+: 119127: error : qemuMonitorJSONCheckError:392 : 
> internal error: unable to execute QEMU command 'device-list-properties':
Parameter 'typename' expects device
> 2018-03-06 05:41:16.201+: 119127: warning : 
> virQEMUCapsLogProbeFailure:5241 : Failed to probe capabilities for 
> /usr/libexec/qemu-kvm: internal error:
unable to execute QEMU command 'device-list-properties': Parameter 'typename' 
expects device
[...]
> Also because of that, I think we should query machine features only if
> QEMU_CAPS_QOM_LIST_PROPERTIES is there.

Aw, fish.

I should have done this myself instead of relying on assumptions
that turned out not to hold up. Thanks for spotting the problem,
I'll try to figure out something :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [RFC PATCH v3 4/9] qemu: Add capabilities for optional pSeries features

2018-03-05 Thread Shivaprasad bhat
Hi Andrea,


This is wrt diffs for old qemus, which I picked from your git.

diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.replies
b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.replies
index 065e2b4..a82438e 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.replies
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.replies
@@ -5176,6 +5176,14 @@
 }

 {
+  "id": "libvirt-42",
+  "error": {
+"class": "DeviceNotFound",
+"desc": "Device 'spapr-machine' not found"
+  }
+}
+
+{

On the contrary, I see query device-list-proprties on spapr-machine results
in CapsProbeFailure. I tried on both v2.11.1 and v.2.10.2

2018-03-06 05:41:16.201+: 119127: error : qemuMonitorJSONCheckError:392
: internal error: unable to execute QEMU command 'device-list-properties':
Parameter 'typename' expects device
2018-03-06 05:41:16.201+: 119127: warning :
virQEMUCapsLogProbeFailure:5241 : Failed to probe capabilities for
/usr/libexec/qemu-kvm: internal error: unable to execute QEMU command
'device-list-properties': Parameter 'typename' expects device

As actual is,

{"execute":"device-list-properties","arguments":{"typename":"spapr-machine"},"id":"libvirt-42"}

{
  "id": "libvirt-42",
  "error": {
"class": "GenericError",
"desc": "Parameter 'typename' expects device"
  }
}

Also because of that, I think we should query machine features only
if QEMU_CAPS_QOM_LIST_PROPERTIES is there.

Thanks,
Shivaprasad

On Thu, Mar 1, 2018 at 11:33 PM, Andrea Bolognani 
wrote:

> Using the new qom-list-properties QMP command allows us to probe
> for the corresponding QEMU machine type options.
>
> Signed-off-by: Andrea Bolognani 
> ---
>  src/qemu/qemu_capabilities.c   |  16 ++
>  src/qemu/qemu_capabilities.h   |   6 +
>  .../qemucapabilitiesdata/caps_1.2.2.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_1.3.1.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_1.4.2.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_1.5.3.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_1.6.0.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_1.7.0.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.1.1.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml   |   2 +-
>  .../caps_2.10.0-gicv2.aarch64.replies  |  24 ++-
>  .../caps_2.10.0-gicv2.aarch64.xml  |   2 +-
>  .../caps_2.10.0-gicv3.aarch64.replies  |  24 ++-
>  .../caps_2.10.0-gicv3.aarch64.xml  |   2 +-
>  .../qemucapabilitiesdata/caps_2.10.0.ppc64.replies |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.10.0.s390x.replies |  26 ++--
>  tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |   2 +-
>  .../caps_2.10.0.x86_64.replies |  30 ++--
>  tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |   2 +-
>  .../caps_2.12.0-gicv2.aarch64.replies  |  24 ++-
>  .../caps_2.12.0-gicv2.aarch64.xml  |   2 +-
>  .../caps_2.12.0-gicv3.aarch64.replies  |  24 ++-
>  .../caps_2.12.0-gicv3.aarch64.xml  |   2 +-
>  .../qemucapabilitiesdata/caps_2.12.0.ppc64.replies | 170
> -
>  tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |   6 +-
>  .../caps_2.12.0.x86_64.replies |  30 ++--
>  tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |   2 +-
>  .../qemucapabilitiesdata/caps_2.4.0.x86_64.replies |  20 ++-
>  tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.5.0.x86_64.replies |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |   2 +-
>  .../caps_2.6.0-gicv2.aarch64.replies   |  24 ++-
>  .../caps_2.6.0-gicv2.aarch64.xml   |   2 +-
>  .../caps_2.6.0-gicv3.aarch64.replies   |  24 ++-
>  .../caps_2.6.0-gicv3.aarch64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.6.0.ppc64.replies  |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml|   2 +-
>  .../qemucapabilitiesdata/caps_2.6.0.x86_64.replies |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.7.0.s390x.replies  |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml|   2 +-
>  .../qemucapabilitiesdata/caps_2.7.0.x86_64.replies |  22 ++-
>  tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml   |   2 +-
>  .../qemucapabilitiesdata/caps_2.8.0.s390x.replies  |  26 ++--
>