History | View | Annotate | Download (4.9 kB)
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
pci: Common overflow prevention
Introduce pci_config_read/write_common helpers to prevent passingaccesses down the callback chain that go beyond the config space limits.Adjust length assertions as they are no longer correct (cutting maygenerate valid 3 byte accesses)....
pci: use devfn for pci_find_device() instead of (slot, fn) pair
(slot, fn) pair is somewhat confusing because of ARI.So use devfn for pci_find_device() instead of (slot, fn).
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Add get_fw_dev_path callback for system bus.
Prints out mmio or pio used to access child device.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Make simple io mem handler endian aware
As an alternative to the 3 individual handlers, there is also a simplifiedio mem hook function. To be consistent, let's add an endianness parameterthere too.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci-host: Delegate bswap to mmio layer
The only reason we have bswap versions of the pci host code is thatmost pci host devices are little endian. The ppc e500 is the onlyodd one here, being big endian.
So let's directly pass the endianness down to the mmio layer and not...
pci_host: fix breakage
This has been broken by commit 952760bb7bce7fbfe0afcf04fee268745f297b87
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Compile pci_host only once
Convert pci_host_conf_register_mmio_noswap(x) topci_host_conf_register_mmio(x, 0).
Convert pci_host_conf_register_mmio(x) topci_host_conf_register_mmio(x, 1) for big endian hosts, all caseshappen to be BE.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
pci_host: rewrite using rwhandler
Save a ton of code by switching pcihost to use rwhandler.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
PCI: Fix a typo
Fixes build with PCI_DEBUG defined.
pci_host: remove unnecessary & 0xff.
This patch removes unnecessary & 0xff in pci_dev_find_by_addr().
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.So shorten them. Now they arepci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: rename (pci_/pcie_mmcfg_)addr_to_dev
This patch renames pci_addr_to_dev(), pcie_mmcfg_addr_to_dev()to pci_dev_find_by_addr(), pcie_dev_find_by_mmcfg_addr()as "Michael S. Tsirkin" <mst@redhat.com> suggested.
pci: remove pci_addr_to_config() by open code
This patch removes pci_addr_to_config() and open code itas suggested by Michael S. Tsirkin <mst@redhat.com>.
pci: simplify (pci_/pcie_mmcfg_)data_read()
Remove switch on length: we don't care abouthigh bits for value, so just return all onesif no device. And add one assert().
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
pci: move pci host stuff from pci.c to pci_host.c
Move pci host stuff from pci.c to pci_host.c.And add some comments.Later pcie host bridge functions will be defined in pcie_host.cnot to bloat pci.c.
pci_host: change the signature of pci_data_{read, write}.
change the first argument, void opaque to PCIBus *sof the pci_data_{read, write}.They aren't used as direct callback so the argument typedon't have to be void. So change it to the right type....
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci_host.h: move functions in pci_host.h into .c file.
split static functions in pci_host.h into pci_host.c andpci_host_template.h.Later a structures declared in pci_host.h, PCIHostState, will be used.However pci_host.h doesn't allow to include itself easily. This patches...