projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bb4ca5
)
PCI: Fix bus address conversion
author
Blue Swirl
<blauwirbel@gmail.com>
Sun, 27 Dec 2009 20:52:36 +0000
(20:52 +0000)
committer
Blue Swirl
<blauwirbel@gmail.com>
Sun, 27 Dec 2009 20:52:36 +0000
(20:52 +0000)
Pass physical addresses to map functions instead of PCI bus addresses.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/pci.c
patch
|
blob
|
history
diff --git
a/hw/pci.c
b/hw/pci.c
index 9722fce53d6193d8ece3d88e1fa5add0a67b682b..081438338d27ccef65ce96224d2236805db41e4a 100644
(file)
--- a/
hw/pci.c
+++ b/
hw/pci.c
@@
-949,7
+949,12
@@
static void pci_update_mappings(PCIDevice *d)
* Teach them such cases, such that filtered_size < size and
* addr & (size - 1) != 0.
*/
- r->map_func(d, i, r->addr, r->filtered_size, r->type);
+ if (r->type & PCI_BASE_ADDRESS_SPACE_IO) {
+ r->map_func(d, i, r->addr, r->filtered_size, r->type);
+ } else {
+ r->map_func(d, i, pci_to_cpu_addr(d->bus, r->addr),
+ r->filtered_size, r->type);
+ }
}
}
}