diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-22 10:14:18 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-22 10:14:18 -0500 |
commit | c9fea5d701f8fd33f0843728ec264d95cee3ed37 (patch) | |
tree | 16d34b137699c16d62ff516d5b32d8c1ec73427b /exec.c | |
parent | a20bd9eec3cf3f9dd7e27d45a96d7b1b9ab09ebd (diff) | |
parent | e1622f4b15391bd44eb0f99a244fdf19a20fd981 (diff) | |
download | hqemu-c9fea5d701f8fd33f0843728ec264d95cee3ed37.zip hqemu-c9fea5d701f8fd33f0843728ec264d95cee3ed37.tar.gz |
Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging
# By Paolo Bonzini (2) and others
# Via Paolo Bonzini
* bonzini/iommu-for-anthony:
exec: fix incorrect assumptions in memory_access_size
memory: Return -1 again on reads from unsigned regions
memory: actually set the owner
exec.c: Pass correct pointer type to qemu_ram_ptr_length
Message-id: 1374264478-23913-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -1379,7 +1379,7 @@ static void *qemu_safe_ram_ptr(ram_addr_t addr) /* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr * but takes a size argument */ -static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size) +static void *qemu_ram_ptr_length(ram_addr_t addr, hwaddr *size) { if (*size == 0) { return NULL; @@ -1898,14 +1898,10 @@ static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write) static int memory_access_size(MemoryRegion *mr, unsigned l, hwaddr addr) { - unsigned access_size_min = mr->ops->impl.min_access_size; - unsigned access_size_max = mr->ops->impl.max_access_size; + unsigned access_size_max = mr->ops->valid.max_access_size; /* Regions are assumed to support 1-4 byte accesses unless otherwise specified. */ - if (access_size_min == 0) { - access_size_min = 1; - } if (access_size_max == 0) { access_size_max = 4; } @@ -1922,9 +1918,6 @@ static int memory_access_size(MemoryRegion *mr, unsigned l, hwaddr addr) if (l > access_size_max) { l = access_size_max; } - /* ??? The users of this function are wrong, not supporting minimums larger - than the remaining length. C.f. memory.c:access_with_adjusted_size. */ - assert(l >= access_size_min); return l; } |