Skip to content

Commit

Permalink
q35: fix get_mmcfg_size to use uint64 visitor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco authored and Markus Armbruster committed Jun 20, 2017
1 parent 3152779 commit d015c4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hw/pci-host/q35.c
Expand Up @@ -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[] = {
Expand Down

0 comments on commit d015c4e

Please sign in to comment.