Skip to content
Snippets Groups Projects
Commit c2c1b0f8 authored by Avi Kivity's avatar Avi Kivity
Browse files

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: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent cf9182e2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment