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>
This commit is contained in:
Isaku Yamahata authored and Michael S. Tsirkin committed 2009-12-23 16:35:01 +02:00
1 parent f2c688bb42
commit 4da5fcd391
1 file changed
+3 -3
+3 -3
View File
@@ -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)