History | View | Annotate | Download (4.7 kB)
pcie_host: convert to memory API
Assuming that mmcfg size cannot change at runtime.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pcie_host: verify mmcfg address range
For a conventional pci device behinda pcie-to-pci bridge, pci_host handlers get confused byan out of bounds access in the range [256, 4K).
Check for such an access and make it have no effect.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
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 endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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: 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: pcie host and mmcfg support.
This patch adds common routines for pcie host bridge and pcie mmcfg.This will be used by q35 based chipset emulation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>