From: Marc-André Lureau Date: Wed, 7 Jun 2017 16:36:05 +0000 (+0400) Subject: q35: fix get_mmcfg_size to use uint64 visitor X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d015c4ea6ff49a164cad68992e529716bc1f5311;p=qmiga%2Fqemu.git 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 Suggested-by: Markus Armbruster Reviewed-by: Markus Armbruster Message-Id: <20170607163635.17635-14-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index cd5c49616e..e8a04d31d1 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -129,9 +129,8 @@ static void q35_host_get_mmcfg_size(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { 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[] = {