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-30 07:38:06 +11:00
2023-03-10 15:35:38 +08:00
2023-09-20 07:54:34 +03:00
2024-03-12 19:28:32 +08:00
2024-03-12 19:28:32 +08:00
2024-06-04 15:14:25 +08:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-11-13 15:33:37 +08:00
2024-03-12 19:28:31 +08:00
2024-03-12 19:28:31 +08:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2019-08-16 13:31:52 +02:00
2024-06-04 15:14:25 +08:00
2023-05-23 15:20:15 +08:00
2023-12-30 07:38:06 +11:00
2024-02-02 13:51:59 +00:00
2023-12-30 07:38:06 +11:00
2024-03-12 19:28:32 +08:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2024-02-02 13:51:59 +00:00
2024-06-04 15:14:25 +08:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00