Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-08 Thread Cindy Lu
On Mon, Apr 8, 2024 at 12:59 PM Jason Wang wrote: > > On Sun, Apr 7, 2024 at 3:00 PM Cindy Lu wrote: > > > > On Sun, Apr 7, 2024 at 12:20 PM Jason Wang wrote: > > > > > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > > > > > When the guest calls virtio_stop and then virtio_reset, > >

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Jason Wang
On Sun, Apr 7, 2024 at 3:00 PM Cindy Lu wrote: > > On Sun, Apr 7, 2024 at 12:20 PM Jason Wang wrote: > > > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > > > When the guest calls virtio_stop and then virtio_reset, > > > > Guests could not call those functions directly, it is

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Jason Wang
On Sun, Apr 7, 2024 at 7:53 PM Michael S. Tsirkin wrote: > > On Sun, Apr 07, 2024 at 12:19:57PM +0800, Jason Wang wrote: > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > > > When the guest calls virtio_stop and then virtio_reset, > > > > Guests could not call those functions directly,

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Michael S. Tsirkin
On Sun, Apr 07, 2024 at 12:19:57PM +0800, Jason Wang wrote: > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > When the guest calls virtio_stop and then virtio_reset, > > Guests could not call those functions directly, it is triggered by for > example writing to some of the registers like

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Cindy Lu
On Sun, Apr 7, 2024 at 12:20 PM Jason Wang wrote: > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > When the guest calls virtio_stop and then virtio_reset, > > Guests could not call those functions directly, it is triggered by for > example writing to some of the registers like reset

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-06 Thread Jason Wang
On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > When the guest calls virtio_stop and then virtio_reset, Guests could not call those functions directly, it is triggered by for example writing to some of the registers like reset or others. > the vector will change > to VIRTIO_NO_VECTOR and

[PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-02 Thread Cindy Lu
When the guest calls virtio_stop and then virtio_reset, the vector will change to VIRTIO_NO_VECTOR and the IRQFD for this vector will be released. After that If you want to change the vector back, it will cause a crash. To fix this, we need to call the function "kvm_virtio_pci_vector_use_one()"