diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-27 10:08:27 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-20 16:32:47 +0200 |
commit | 052e87b073cb70afcd767d32f45af2794a5a65de (patch) | |
tree | ef25073c63f9c7e2be0e2ddee46ce1524811becd /hw/xen | |
parent | 733d5ef52721a836b1d9b5cd0f15a41db88829d0 (diff) | |
download | qemu-052e87b073cb70afcd767d32f45af2794a5a65de.zip qemu-052e87b073cb70afcd767d32f45af2794a5a65de.tar.gz qemu-052e87b073cb70afcd767d32f45af2794a5a65de.tar.bz2 |
memory: make section size a 128-bit integer
So far, the size of all regions passed to listeners could fit in 64 bits,
because artificial regions (containers and aliases) are eliminated by
the memory core, leaving only device regions which have reasonable sizes
An IOMMU however cannot be eliminated by the memory core, and may have
an artificial size, hence we may need 65 bits to represent its size.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xen')
-rw-r--r-- | hw/xen/xen_pt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index c199818..c31a28a 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -547,7 +547,7 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, struct CheckBarArgs args = { .s = s, .addr = sec->offset_within_address_space, - .size = sec->size, + .size = int128_get64(sec->size), .rc = false, }; @@ -576,7 +576,7 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) { uint32_t guest_port = sec->offset_within_address_space; uint32_t machine_port = s->bases[bar].access.pio_base; - uint32_t size = sec->size; + uint32_t size = int128_get64(sec->size); rc = xc_domain_ioport_mapping(xen_xc, xen_domid, guest_port, machine_port, size, op); @@ -588,7 +588,7 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, pcibus_t guest_addr = sec->offset_within_address_space; pcibus_t machine_addr = s->bases[bar].access.maddr + sec->offset_within_region; - pcibus_t size = sec->size; + pcibus_t size = int128_get64(sec->size); rc = xc_domain_memory_mapping(xen_xc, xen_domid, XEN_PFN(guest_addr + XC_PAGE_SIZE - 1), XEN_PFN(machine_addr + XC_PAGE_SIZE - 1), |