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-05-03 15:47:47 +02:00
2024-09-06 13:59:37 +01:00
2024-05-03 15:47:47 +02:00
2024-05-03 15:47:47 +02:00
2024-07-24 15:39:43 +10:00
2024-07-23 20:30:36 +02:00
2024-09-06 13:59:37 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-04-25 09:43:29 -07:00
2024-09-05 13:12:36 +01:00
2024-07-23 20:30:36 +02:00
2024-09-05 13:12:36 +01:00
2024-05-03 15:47:48 +02:00
2024-05-06 10:19:56 -07:00
2024-07-24 12:58:46 +10:00
2024-06-16 21:08:54 +02:00
2024-05-10 15:45:15 +02:00