pci/aer: factor out common code
Same logic is used to assert interruptsand send msix messages, so add a static functin for this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci/aer: remove dead code
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 write
config write handling for aer seems broken:For example, it won't clear a level interruptwhen command register is set to 0.
Make it match the spec: level should equalthe logical or of enabled bits, msi onlybe sent when the logical or changes....
pci/aer: fix error injection
Fix the injection logic upon aer message to follow 6.2.4.1.2 moreclosely: specifically only send an msi interrupt when the logical or ofthe enabled bits changed, not when a bit which was previously clearbecomes set.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
pci: untangle pci/msi dependency
msi depends on pci but pci should not depend on msi.The only dependency we have is a recent additionof pci_msi_ functions, IMO they add little enough toopen-code in the small number of users.
Follow-up patches add more cleanups....
virtio-net: don't dma while vm is stopped
DMA into memory while VM is stopped makes ithard to debug migration (consequitive savesresult in different files).Fixing this completely is a large effort,this patch does this for virtio-net.
virtio-net: stop/start bh when appropriate
Avoid sending out packets, and modifyingmemory, when VM is stopped.Add assert statements to verify this does not happen.
Avoid scheduling bh when vhost-net is started.
Stop bh when driver disabled bus mastering...
pci: make command SERR bit writable
pcie aer needs SERR bit to be writable, and the PCI spec requiresthis as well. For compatibility, introduce compat global propertycommand_serr_enable and make this bit readonly for a pre 0.14 pcmachine.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
Fix mingw32 and OpenBSD warnings
ffsl() is not universally available, so there are these warningson 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'...
vhost: Fix address calculation in vhost_dev_sync_region()
We still need advance address even we find there's no dirty pages incurrent chunk.
Signed-off-by: Jason Wang <jasowang@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
View revisions
Also available in: Atom