From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dejJ6-0007Ps-Ix for qemu-devel@nongnu.org; Mon, 07 Aug 2017 10:47:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dejIr-0003wM-HV for qemu-devel@nongnu.org; Mon, 07 Aug 2017 10:47:00 -0400 From: Markus Armbruster Date: Mon, 7 Aug 2017 16:45:16 +0200 Message-Id: <1502117160-24655-13-git-send-email-armbru@redhat.com> In-Reply-To: <1502117160-24655-1-git-send-email-armbru@redhat.com> References: <1502117160-24655-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [RFC PATCH 12/56] pc-dimm: Make size and address unsigned in QAPI/QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, kwolf@redhat.com, mreitz@redhat.com, jcody@redhat.com, famz@redhat.com, jsnow@redhat.com, pbonzini@redhat.com, marcandre.lureau@redhat.com, dgilbert@redhat.com, quintela@redhat.com, berrange@redhat.com, qemu-block@nongnu.org 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 --- 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