aboutsummaryrefslogtreecommitdiff
path: root/hw/piix_pci.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-12-15 20:26:06 +0900
committerMichael S. Tsirkin <mst@redhat.com>2009-12-23 16:35:01 +0200
commit4da5fcd391983c1d45013ae62be389bcda7d9213 (patch)
treefeacd33e6675185ca5ddda7cb5223b76d5d24a0b /hw/piix_pci.c
parentf2c688bb4264039a351ada7323d0ebb546c3a1a5 (diff)
piix_pci: use range helper function
use range helper function in i440fx_write_config(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r--hw/piix_pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 0dae6f94b0..384d31c0ea 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -137,10 +137,10 @@ static void i440fx_write_config(PCIDevice *dev,
/* XXX: implement SMRAM.D_LOCK */
pci_default_write_config(dev, address, val, len);
- if ((address >= I440FX_PAM &&
- address <= I440FX_PAM + I440FX_PAM_SIZE - 1) ||
- address == I440FX_SMRAM)
+ if (ranges_overlap(address, len, I440FX_PAM, I440FX_PAM_SIZE) ||
+ range_covers_byte(address, len, I440FX_SMRAM)) {
i440fx_update_memory_mappings(d);
+ }
}
static int i440fx_load_old(QEMUFile* f, void *opaque, int version_id)