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
..
2023-12-29 11:17:30 +11:00
2022-11-08 10:23:32 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2017-03-27 12:14:45 +02:00
2024-04-30 16:02:43 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-04-30 16:02:43 +01:00
2022-12-03 22:07:07 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-04-18 11:17:27 +02:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-04-30 16:02:43 +01:00
2023-12-29 11:17:30 +11:00
2023-10-16 11:29:56 +04:00
2023-12-29 11:17:30 +11:00