All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR
@ 2024-04-02 15:00 Cindy Lu
  2024-04-02 15:00 ` [PATCH 1/1] " Cindy Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Cindy Lu @ 2024-04-02 15:00 UTC (permalink / raw)
  To: lulu, mst, jasowang, qemu-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1344 bytes --]

There is a crash in the Non-standard guest image. The root cause of
the issue is that an IRQFD was used After it release 

During the booting process of the Vyatta image, the behavior of the
called function in qemu is as follows:

1. vhost_net_stop() was called. This will call the function
virtio_pci_set_guest_notifiers() with assgin= false, and
virtio_pci_set_guest_notifiers() will release the irqfd for vector 0

2. virtio_reset() was called -->set configure vector to VIRTIO_NO_VECTOR

3.vhost_net_start() was called (at this time the configure vector is
still VIRTIO_NO_VECTOR) and call virtio_pci_set_guest_notifiers() with
assgin= true, so the irqfd for vector 0 was not "init" during this process

4. The system continues to boot, and msix_fire_vector_notifier() was
called unmask the vector 0 and then met the crash
[msix_fire_vector_notifier] 112 called vector 0 is_masked 1
[msix_fire_vector_notifier] 112 called vector 0 is_masked 0

To fix this, we need to call the function "kvm_virtio_pci_vector_use_one()"
when the vector changes back from VIRTIO_NO_VECTOR

Signed-off-by: Cindy Lu <lulu@redhat.com>

Cindy Lu (1):
  virtio-pci: Fix the crash when the vector changes back from
    VIRTIO_NO_VECTOR

 hw/virtio/virtio-pci.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-08  6:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 15:00 [PATCH 0/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR Cindy Lu
2024-04-02 15:00 ` [PATCH 1/1] " Cindy Lu
2024-04-07  4:19   ` Jason Wang
2024-04-07  6:59     ` Cindy Lu
2024-04-08  4:58       ` Jason Wang
2024-04-08  5:58         ` Cindy Lu
2024-04-07 11:53     ` Michael S. Tsirkin
2024-04-08  4:54       ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.