aboutsummaryrefslogtreecommitdiff
path: root/hw/pcie_aer.c
AgeCommit message (Collapse)Author
2012-09-07pcie_aer: clear cmask for Advanced Error Interrupt Message NumberJason Baron
The Advanced Error Interrupt Message Number (bits 31:27 of the Root Error Status Register) is updated when the number of msi messages assigned to a device changes. Migration of windows 7 on q35 chipset failed because the check in get_pci_config_device() fails due to cmask being set on these bits. Its valid to update these bits and we must restore this state across migration. Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-12-06pcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_errorZhi Yong Wu
This function name is a bit wrong. Although it doesn't impact function, it is a bit necessary that we should fixup it. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-06fix spelling in hw sub directoryDong Xu Wang
Correct obvious spelling errors in qemu/hw directory. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-24pcie/aer: fix inject aer error commandIsaku Yamahata
various fixes to make aer inject error command work. - wrong assert - command line parser - err.status needs initialization Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-06-15Merge remote-tracking branch 'origin/master' into pciMichael S. Tsirkin
Conflicts: hw/virtio-pci.c
2011-06-12pci: Update pci_regs headerJan Kiszka
Pulls in latest version from kernel 3.0-rc2. Some changes around AER now require local defines as QEMU accesses the error source identification register via sub-words. CC: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-05-08Fix typo in comment (responsiblity -> responsibility)Stefan Weil
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-03-03vmstate: move VMSTATE_PCIE_AER_ERRS to hw/hw.hDmitry Eremin-Solenikov
VMSTATE_PCIE_AER_ERRS is indeed useful for other emulation drivers. Move it to hw/hw.h under the name of VMSTATE_STRUCT_VARRAY_POINTER_UINT16. Also add VMSTATE_STRUCT_VARRAY_POINTER_INT32 which is more or less the same as _UINT16 macro, except the fact it uses int32_t internally. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2010-12-24pcie/aer: glue aer error injection into qemu monitorIsaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-12-09pci/aer: factor out common codeMichael S. Tsirkin
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>
2010-12-09pci/aer: remove dead codeMichael S. Tsirkin
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>
2010-12-09pci/aer: fix interrupt on config writeMichael S. Tsirkin
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>
2010-12-09pci/aer: fix error injectionMichael S. Tsirkin
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>
2010-12-09pci: untangle pci/msi dependencyMichael S. Tsirkin
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>
2010-12-04Fix mingw32 and OpenBSD warningsBlue Swirl
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>
2010-11-22pcie_aer: complete unwinding recursionMichael S. Tsirkin
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>
2010-11-22pcie_aer: get rid of recursionMichael S. Tsirkin
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>
2010-11-22pcie/aer: helper functions for pcie aer capabilityIsaku Yamahata
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>