Skip to content

Qemu crashes with pci passthrough

Glauber de Oliveira Costa kvm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3don't exit on errors while registering ioportsqemu/vl.c+7 -50 replies
2/3map regions as registeredqemu/hw/pci.c qemu/hw/pci.h+6 -20 replies
3/3propagate errors from ioport registering up to pci levelqemu/hw/pci-passthrough.c qemu/hw/pci.c qemu/hw/pci.h+45 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Qemu crashes with pci passthrough

Hi,

I've got some qemu crashes while trying to passthrough an ide device to a kvm guest. After some investigation, it turned out that register_ioport_{read/write} will abort on errors instead of returning a meaningful error.

However, even if we do return an error, the asynchronous nature of pci config space mapping updates makes it a little bit hard to treat.

This series of patches basically treats errors in the mapping functions in the pci layer. If anything goes wrong, we unregister the pci device, unmapping any mappings that happened to be sucessfull already.

After these patches are applied, a lot of warnings appears. And, you know, everytime there is a warning, god kills a kitten. But I'm not planning on touching the other pieces of qemu code for this until we set up (or not) in this solution

Comments are very welcome, specially from qemu folks (since it is a bit invasive)