aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/memory.c b/memory.c
index 0dd9695aec..86ffd5342e 100644
--- a/memory.c
+++ b/memory.c
@@ -383,7 +383,11 @@ static MemTxResult memory_region_oldmmio_read_accessor(MemoryRegion *mr,
uint64_t tmp;
tmp = mr->ops->old_mmio.read[ctz32(size)](mr->opaque, addr);
- trace_memory_region_ops_read(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_read(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_read(mr, addr, tmp, size);
+ }
*value |= (tmp & mask) << shift;
return MEMTX_OK;
}
@@ -399,7 +403,11 @@ static MemTxResult memory_region_read_accessor(MemoryRegion *mr,
uint64_t tmp;
tmp = mr->ops->read(mr->opaque, addr, size);
- trace_memory_region_ops_read(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_read(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_read(mr, addr, tmp, size);
+ }
*value |= (tmp & mask) << shift;
return MEMTX_OK;
}
@@ -416,7 +424,11 @@ static MemTxResult memory_region_read_with_attrs_accessor(MemoryRegion *mr,
MemTxResult r;
r = mr->ops->read_with_attrs(mr->opaque, addr, &tmp, size, attrs);
- trace_memory_region_ops_read(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_read(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_read(mr, addr, tmp, size);
+ }
*value |= (tmp & mask) << shift;
return r;
}
@@ -432,7 +444,11 @@ static MemTxResult memory_region_oldmmio_write_accessor(MemoryRegion *mr,
uint64_t tmp;
tmp = (*value >> shift) & mask;
- trace_memory_region_ops_write(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_write(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_write(mr, addr, tmp, size);
+ }
mr->ops->old_mmio.write[ctz32(size)](mr->opaque, addr, tmp);
return MEMTX_OK;
}
@@ -448,7 +464,11 @@ static MemTxResult memory_region_write_accessor(MemoryRegion *mr,
uint64_t tmp;
tmp = (*value >> shift) & mask;
- trace_memory_region_ops_write(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_write(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_write(mr, addr, tmp, size);
+ }
mr->ops->write(mr->opaque, addr, tmp, size);
return MEMTX_OK;
}
@@ -464,7 +484,11 @@ static MemTxResult memory_region_write_with_attrs_accessor(MemoryRegion *mr,
uint64_t tmp;
tmp = (*value >> shift) & mask;
- trace_memory_region_ops_write(mr, addr, tmp, size);
+ if (mr->subpage) {
+ trace_memory_region_subpage_write(mr, addr, tmp, size);
+ } else {
+ trace_memory_region_ops_write(mr, addr, tmp, size);
+ }
return mr->ops->write_with_attrs(mr->opaque, addr, tmp, size, attrs);
}