projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2c688b
)
piix_pci: use range helper function
author
Isaku Yamahata
<yamahata@valinux.co.jp>
Tue, 15 Dec 2009 11:26:06 +0000
(20:26 +0900)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 23 Dec 2009 14:35:01 +0000
(16:35 +0200)
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>
hw/piix_pci.c
patch
|
blob
|
history
diff --git
a/hw/piix_pci.c
b/hw/piix_pci.c
index 0dae6f94b0e79eda527a4fa2771f215285617c42..384d31c0eaee65d1c126fa6c67a8e05e96e3ac4f 100644
(file)
--- 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)