summaryrefslogtreecommitdiffstats
path: root/hw/pcie_aer.c
Commit message (Collapse)AuthorAgeFilesLines
* pcie/aer: glue aer error injection into qemu monitorIsaku Yamahata2010-12-241-0/+223
| | | | | | | introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci/aer: factor out common codeMichael S. Tsirkin2010-12-091-14/+13
| | | | | | | Same logic is used to assert interrupts and send msix messages, so add a static functin for this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci/aer: remove dead codeMichael S. Tsirkin2010-12-091-23/+2
| | | | | | | Remove some unused variables and return values. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* pci/aer: fix interrupt on config writeMichael S. Tsirkin2010-12-091-29/+17
| | | | | | | | | | | | | config write handling for aer seems broken: For example, it won't clear a level interrupt when command register is set to 0. Make it match the spec: level should equal the logical or of enabled bits, msi only be sent when the logical or changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* pci/aer: fix error injectionMichael S. Tsirkin2010-12-091-16/+35
| | | | | | | | | | Fix the injection logic upon aer message to follow 6.2.4.1.2 more closely: specifically only send an msi interrupt when the logical or of the enabled bits changed, not when a bit which was previously clear becomes set. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* pci: untangle pci/msi dependencyMichael S. Tsirkin2010-12-091-8/+16
| | | | | | | | | | | | msi depends on pci but pci should not depend on msi. The only dependency we have is a recent addition of pci_msi_ functions, IMO they add little enough to open-code in the small number of users. Follow-up patches add more cleanups. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Fix mingw32 and OpenBSD warningsBlue Swirl2010-12-041-1/+1
| | | | | | | | | | | ffsl() is not universally available, so there are these warnings on both mingw32 and OpenBSD: /src/qemu/hw/pcie_aer.c: In function 'pcie_aer_update_log': /src/qemu/hw/pcie_aer.c:399: warning: implicit declaration of function 'ffsl' Since status field in PCIEAERErr is uint32_t, we can just use ffs() instead. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pcie_aer: complete unwinding recursionMichael S. Tsirkin2010-11-221-53/+27
| | | | | | | | | Open-code functions created in the previous patch, to make code more compact and clear. Detcted and documented what looks like a bug in code that becomes apparent from this refactoring. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pcie_aer: get rid of recursionMichael S. Tsirkin2010-11-221-17/+31
| | | | | | | Added some TODOs: they are trivial but omitted here to make the patch logic as transparent as possible. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pcie/aer: helper functions for pcie aer capabilityIsaku Yamahata2010-11-221-0/+827
This patch implements helper functions for pcie aer capability which will be used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud