[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 17/62] vhost-backend: remove vhost_kernel_reset_device()
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v3 17/62] vhost-backend: remove vhost_kernel_reset_device() |
|
Date: |
Sun, 22 Oct 2023 05:23:12 -0400 |
From: Stefan Hajnoczi <stefanha@redhat.com>
vhost_kernel_reset_device() invokes RESET_OWNER, which disassociates the
owner process from the device. The device is left non-operational since
SET_OWNER is only called once during startup in vhost_dev_init().
vhost_kernel_reset_device() is never called so this latent bug never
appears. Get rid of vhost_kernel_reset_device() for now. If someone
needs it in the future they'll need to implement it correctly.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20231004014532.1228637-3-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
---
hw/virtio/vhost-backend.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 8e581575c9..17f3fc6a08 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -197,11 +197,6 @@ static int vhost_kernel_set_owner(struct vhost_dev *dev)
return vhost_kernel_call(dev, VHOST_SET_OWNER, NULL);
}
-static int vhost_kernel_reset_device(struct vhost_dev *dev)
-{
- return vhost_kernel_call(dev, VHOST_RESET_OWNER, NULL);
-}
-
static int vhost_kernel_get_vq_index(struct vhost_dev *dev, int idx)
{
assert(idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs);
@@ -322,7 +317,6 @@ const VhostOps kernel_ops = {
.vhost_get_features = vhost_kernel_get_features,
.vhost_set_backend_cap = vhost_kernel_set_backend_cap,
.vhost_set_owner = vhost_kernel_set_owner,
- .vhost_reset_device = vhost_kernel_reset_device,
.vhost_get_vq_index = vhost_kernel_get_vq_index,
.vhost_vsock_set_guest_cid = vhost_kernel_vsock_set_guest_cid,
.vhost_vsock_set_running = vhost_kernel_vsock_set_running,
--
MST
- [PULL v3 04/62] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add(), (continued)
- [PULL v3 04/62] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add(), Michael S. Tsirkin, 2023/10/22
- [PULL v3 09/62] vhost-user: tighten "reply_supported" scope in "set_vring_addr", Michael S. Tsirkin, 2023/10/22
- [PULL v3 08/62] vhost-user: strip superfluous whitespace, Michael S. Tsirkin, 2023/10/22
- [PULL v3 06/62] vhost: Expose vhost_svq_available_slots(), Michael S. Tsirkin, 2023/10/22
- [PULL v3 10/62] vhost-user: factor out "vhost_user_write_sync", Michael S. Tsirkin, 2023/10/22
- [PULL v3 11/62] vhost-user: flatten "enforce_reply" into "vhost_user_write_sync", Michael S. Tsirkin, 2023/10/22
- [PULL v3 13/62] vhost-user: allow "vhost_set_vring" to wait for a reply, Michael S. Tsirkin, 2023/10/22
- [PULL v3 14/62] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously, Michael S. Tsirkin, 2023/10/22
- [PULL v3 15/62] memory: initialize 'fv' in MemoryRegionCache to make Coverity happy, Michael S. Tsirkin, 2023/10/22
- [PULL v3 12/62] vhost-user: hoist "write_sync", "get_features", "get_u64", Michael S. Tsirkin, 2023/10/22
- [PULL v3 17/62] vhost-backend: remove vhost_kernel_reset_device(),
Michael S. Tsirkin <=
- [PULL v3 16/62] vhost-user: do not send RESET_OWNER on device reset, Michael S. Tsirkin, 2023/10/22
- [PULL v3 19/62] hw/i386/acpi-build: Remove build-time assertion on PIIX/ICH9 reset registers being identical, Michael S. Tsirkin, 2023/10/22
- [PULL v3 21/62] hw/display: fix memleak from virtio_add_resource, Michael S. Tsirkin, 2023/10/22
- [PULL v3 18/62] virtio: call ->vhost_reset_device() during reset, Michael S. Tsirkin, 2023/10/22
- [PULL v3 22/62] hw/i386/pc: Merge two if statements into one, Michael S. Tsirkin, 2023/10/22
- [PULL v3 23/62] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge, Michael S. Tsirkin, 2023/10/22
- [PULL v3 20/62] timer/i8254: Fix one shot PIT mode, Michael S. Tsirkin, 2023/10/22
- [PULL v3 24/62] hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize(), Michael S. Tsirkin, 2023/10/22
- [PULL v3 26/62] hw/i386/pc_piix: Wire PIIX3's ISA interrupts by new "isa-irqs" property, Michael S. Tsirkin, 2023/10/22