From d015c4ea6ff49a164cad68992e529716bc1f5311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:36:05 +0400 Subject: [PATCH] q35: fix get_mmcfg_size to use uint64 visitor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hw/pci-host/q35.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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[] = {