Sizes and addresses should use QAPI type 'size' (uint64_t).
PCDIMMDeviceInfo members @addr and @size are 'int' (int64_t).
qmp_pc_dimm_device_list() implicitly converts from uint64_t.

Change these PCDIMMDeviceInfo members to 'size'.

query-memory-devices now reports sizes and addresses above 2^63-1
correctly instead of their (negative) two's complement.

HMP's "info memory-devices" already reported them correctly, because
it printed the signed integers with PRIx64 and PRIu32.

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
 qapi-schema.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index 23eb60d..6aa6be9 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -6057,8 +6057,8 @@
 ##
 { 'struct': 'PCDIMMDeviceInfo',
   'data': { '*id': 'str',
-            'addr': 'int',
-            'size': 'int',
+            'addr': 'size',
+            'size': 'size',
             'slot': 'int',
             'node': 'int',
             'memdev': 'str',
-- 
2.7.5


Reply via email to