aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-12-09 11:44:25 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-12-17 17:33:48 +0100
commit612263cf33062f7441a5d0e3b37c65991fdc3210 (patch)
treeb2f6e1e60a93546ac7e96647b67b113b102841fb /include/exec
parenta676854f3447019c7c4b005ab6aece905fccfddd (diff)
memory: avoid unnecessary object_ref/unref
For the common case of DMA into non-hotplugged RAM, it is unnecessary but expensive to do object_ref/unref. Add back an owner field to MemoryRegion, so that these memory regions can skip the reference counting. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 5b1fd123cd..24b7cba737 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -172,6 +172,7 @@ struct MemoryRegion {
bool global_locking;
uint8_t dirty_log_mask;
ram_addr_t ram_addr;
+ Object *owner;
const MemoryRegionIOMMUOps *iommu_ops;
const MemoryRegionOps *ops;