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>
This commit is contained in:
parent
1db4269f34
commit
4ec37f9048
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user