diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-11-28 17:22:25 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-01-11 13:57:23 +0100 |
commit | 4ec37f904803d64a4429dfcd3225455be4203dd9 (patch) | |
tree | 0e7b278d8ff227df1c4ff191b0e110a3cd55e113 /hw/pci-host | |
parent | 1db4269f34764f2595e87fa958b8d13bcbac47ed (diff) |
pam: wrap MemoryRegion initialization in a transaction
This avoids a few re-rendering of the memory AddressSpace.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r-- | hw/pci-host/pam.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c index e361ecb7ee..aa5ecfd0c2 100644 --- a/hw/pci-host/pam.c +++ b/hw/pci-host/pam.c @@ -52,11 +52,13 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory, memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", ram_memory, start, size); + memory_region_transaction_begin(); for (i = 0; i < 4; ++i) { memory_region_set_enabled(&mem->alias[i], false); memory_region_add_subregion_overlap(system_memory, start, &mem->alias[i], 1); } + memory_region_transaction_commit(); mem->current = 0; } |