Hanna Czenczek 00adced5c3 virtio: Allow .get_vhost() without vhost_started
Historically, .get_vhost() was probably only called when
vdev->vhost_started is true.  However, we now decidedly want to call it
also when vhost_started is false, specifically so we can issue a reset
to the vhost back-end while device operation is stopped.

Some .get_vhost() implementations dereference some pointers (or return
offsets from them) that are probably guaranteed to be non-NULL when
vhost_started is true, but not necessarily otherwise.  This patch makes
all such implementations check all such pointers, returning NULL if any
is NULL.

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20240723163941.48775-2-hreitz@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2024-09-10 14:27:56 -04:00
..
2024-07-21 07:46:38 +02:00
2024-07-21 14:42:58 -04:00
2024-04-30 16:02:43 +01:00
2024-09-05 13:12:36 +01:00
2024-01-30 21:20:20 +03:00
2024-01-05 16:20:15 +01:00
2024-07-16 20:26:47 +02:00
2024-07-26 09:21:06 +10:00
2024-06-16 21:08:54 +02:00
2024-09-05 13:12:36 +01:00
2023-03-20 12:43:50 +01:00
2024-02-27 09:37:21 +01:00