qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 13/43] q35: fix get_mmcfg_size to use uint64 visi


From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH v3 13/43] q35: fix get_mmcfg_size to use uint64 visitor
Date: Wed, 7 Jun 2017 20:36:05 +0400

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

Signed-off-by: Marc-André Lureau <address@hidden>
Suggested-by: Markus Armbruster <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
 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[] = {
-- 
2.13.0.91.g00982b8dd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]