qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V5 24/29] pci: fix pci_default_write_config()


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH V5 24/29] pci: fix pci_default_write_config()
Date: Fri, 9 Oct 2009 15:28:57 +0900

When updated ROM expantion address of header type 0, it missed
to update mappings.
Add PCI_ROM_ADDRESS check whether to call pci_update_mappings()

Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
---
 hw/pci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index 4436e12..8e396b6 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -700,7 +700,8 @@ void pci_default_write_config(PCIDevice *d, uint32_t addr, 
uint32_t val, int l)
         uint8_t wmask = d->wmask[addr];
         d->config[addr] = (d->config[addr] & ~wmask) | (val & wmask);
     }
-    if (memcmp(orig + PCI_BASE_ADDRESS_0, d->config + PCI_BASE_ADDRESS_0, 24)
+    if ((memcmp(orig + PCI_BASE_ADDRESS_0, d->config + PCI_BASE_ADDRESS_0, 24) 
||
+         memcmp(orig + PCI_ROM_ADDRESS, d->config + PCI_ROM_ADDRESS, 4))
         || ((orig[PCI_COMMAND] ^ d->config[PCI_COMMAND])
             & (PCI_COMMAND_MEMORY | PCI_COMMAND_IO)))
         pci_update_mappings(d);
-- 
1.6.0.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]