[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/27] vhost-backend: do not depend on CONFIG_VHOST_VSOCK
From: |
Paolo Bonzini |
Subject: |
[PULL 24/27] vhost-backend: do not depend on CONFIG_VHOST_VSOCK |
Date: |
Thu, 12 May 2022 19:25:02 +0200 |
The vsock callbacks .vhost_vsock_set_guest_cid and
.vhost_vsock_set_running are the only ones to be conditional
on #ifdef CONFIG_VHOST_VSOCK. This is different from any other
device-dependent callbacks like .vhost_scsi_set_endpoint, and it
also broke when CONFIG_VHOST_VSOCK was changed to a per-target
symbol.
It would be possible to also use the CONFIG_DEVICES include, but
really there is no reason for most virtio files to be per-target
so just remove the #ifdef to fix the issue.
Reported-by: Dov Murik <dovmurik@linux.ibm.com>
Fixes: 9972ae314f ("build: move vhost-vsock configuration to Kconfig")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/vhost-backend.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index e409a865ae..4de8b6b3b0 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -203,7 +203,6 @@ static int vhost_kernel_get_vq_index(struct vhost_dev *dev,
int idx)
return idx - dev->vq_index;
}
-#ifdef CONFIG_VHOST_VSOCK
static int vhost_kernel_vsock_set_guest_cid(struct vhost_dev *dev,
uint64_t guest_cid)
{
@@ -214,7 +213,6 @@ static int vhost_kernel_vsock_set_running(struct vhost_dev
*dev, int start)
{
return vhost_kernel_call(dev, VHOST_VSOCK_SET_RUNNING, &start);
}
-#endif /* CONFIG_VHOST_VSOCK */
static void vhost_kernel_iotlb_read(void *opaque)
{
@@ -319,10 +317,8 @@ const VhostOps kernel_ops = {
.vhost_set_owner = vhost_kernel_set_owner,
.vhost_reset_device = vhost_kernel_reset_device,
.vhost_get_vq_index = vhost_kernel_get_vq_index,
-#ifdef CONFIG_VHOST_VSOCK
.vhost_vsock_set_guest_cid = vhost_kernel_vsock_set_guest_cid,
.vhost_vsock_set_running = vhost_kernel_vsock_set_running,
-#endif /* CONFIG_VHOST_VSOCK */
.vhost_set_iotlb_callback = vhost_kernel_set_iotlb_callback,
.vhost_send_device_iotlb_msg = vhost_kernel_send_device_iotlb_msg,
};
--
2.36.0
- [PULL 04/27] checkpatch: fix g_malloc check, (continued)
- [PULL 04/27] checkpatch: fix g_malloc check, Paolo Bonzini, 2022/05/12
- [PULL 07/27] hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection, Paolo Bonzini, 2022/05/12
- [PULL 09/27] tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable, Paolo Bonzini, 2022/05/12
- [PULL 10/27] tests/qtest/libqos: Add generic pci host bridge in arm-virt machine, Paolo Bonzini, 2022/05/12
- [PULL 13/27] machine: add mem compound property, Paolo Bonzini, 2022/05/12
- [PULL 15/27] machine: move more memory validation to Machine object, Paolo Bonzini, 2022/05/12
- [PULL 19/27] net: slirp: add support for CFI-friendly timer API, Paolo Bonzini, 2022/05/12
- [PULL 23/27] coroutine-lock: qemu_co_queue_restart_all is a coroutine-only qemu_co_enter_all, Paolo Bonzini, 2022/05/12
- [PULL 25/27] meson: link libpng independent of vnc, Paolo Bonzini, 2022/05/12
- [PULL 26/27] vl: make machine type deprecation a warning, Paolo Bonzini, 2022/05/12
- [PULL 24/27] vhost-backend: do not depend on CONFIG_VHOST_VSOCK,
Paolo Bonzini <=
- [PULL 27/27] vmxcap: add tertiary execution controls, Paolo Bonzini, 2022/05/12
- Re: [PULL 00/27] Misc patches for 2022-05-12, Richard Henderson, 2022/05/12