q35: fix get_mmcfg_size to use uint64 visitor

e->size is hwaddr, i.e. uint64_t. We silently truncate.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20170607163635.17635-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Marc-André Lureau 2017-06-07 20:36:05 +04:00 committed by Markus Armbruster
parent 3152779cd6
commit d015c4ea6f

View File

@ -129,9 +129,8 @@ static void q35_host_get_mmcfg_size(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp) void *opaque, Error **errp)
{ {
PCIExpressHost *e = PCIE_HOST_BRIDGE(obj); PCIExpressHost *e = PCIE_HOST_BRIDGE(obj);
uint32_t value = e->size;
visit_type_uint32(v, name, &value, errp); visit_type_uint64(v, name, &e->size, errp);
} }
static Property mch_props[] = { static Property mch_props[] = {