acpi: use range helper function.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Tue, 15 Dec 2009 11:26:03 +0000 (20:26 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 23 Dec 2009 14:35:00 +0000 (16:35 +0200)
use range helper function in pm_write_config().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi.c

index 9a69e7df1e8b48dee154df97a854386683eb0716..ad72297a94b8f6577c373daa78d3331a9665d71f 100644 (file)
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -437,7 +437,7 @@ static void pm_write_config(PCIDevice *d,
                             uint32_t address, uint32_t val, int len)
 {
     pci_default_write_config(d, address, val, len);
-    if (address == 0x80)
+    if (range_covers_byte(address, len, 0x80))
         pm_io_space_update((PIIX4PMState *)d);
 }