[Top][All Lists]
[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
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), (continued)
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/09
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Isaku Yamahata, 2009/10/13
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Blue Swirl, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Blue Swirl, 2009/10/13
[Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/09
[Qemu-devel] [PATCH V5 12/29] pci_host: consolidate pci config address access., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 21/29] pci_host: change the signature of pci_data_{read, write}., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 24/29] pci: fix pci_default_write_config(),
Isaku Yamahata <=
[Qemu-devel] [PATCH V5 25/29] pci: add helper functions for pci config write function., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 20/29] pci: move pci host stuff from pci.c to pci_host.c, Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 06/29] pci: use helper functions to access pci config space., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 19/29] pci: split out ioport address parsing from pci configuration access logic., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 26/29] pci: use helper function in pci_default_write_config(), Isaku Yamahata, 2009/10/09