diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-01 11:04:39 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-08-25 10:56:33 +0300 |
commit | c2c1b0f84b3dd56f5a8e192b97881e62e82e3b14 (patch) | |
tree | 0ae01f586be25041eb7b3d82d832339cb895747f /hw/piix_pci.c | |
parent | cf9182e2290732be9f8d4f73ba3d6f3484380450 (diff) |
piix_pci: wrap memory update in a transaction
The code will remap all PAMs, even if just one is updated, resulting
in reduced performance. Wrap in a transaction to detect that those
other PAMs have not changed.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index f892994eae..8f6ea42e2c 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -142,6 +142,7 @@ static void i440fx_update_memory_mappings(PCII440FXState *d) int i, r; uint32_t smram; + memory_region_transaction_begin(); update_pam(d, 0xf0000, 0x100000, (d->dev.config[I440FX_PAM] >> 4) & 3, &d->pam_regions[0]); for(i = 0; i < 12; i++) { @@ -162,6 +163,7 @@ static void i440fx_update_memory_mappings(PCII440FXState *d) d->smram_enabled = false; } } + memory_region_transaction_commit(); } static void i440fx_set_smm(int val, void *arg) |