From: Stefano Garzarella <sgarzare@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com,
Dov Murik <dovmurik@linux.ibm.com>
Subject: Re: [PATCH] vhost-backend: do not depend on CONFIG_VHOST_VSOCK
Date: Thu, 12 May 2022 09:47:20 +0200 [thread overview]
Message-ID: <20220512074720.wuuj3xalykejiqpx@sgarzare-redhat> (raw)
In-Reply-To: <20220511074328.164544-1-pbonzini@redhat.com>
On Wed, May 11, 2022 at 09:43:28AM +0200, Paolo Bonzini wrote:
>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.
>
I'm i doubt whether or not to add the following Fixes tag, since that
commit only highlighted the problem:
Fixes: 9972ae314f ("build: move vhost-vsock configuration to Kconfig")
>Reported-by: Dov Murik <dovmurik@linux.ibm.com>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>---
> hw/virtio/vhost-backend.c | 4 ----
> 1 file changed, 4 deletions(-)
Anyway, the path LGTM:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks,
Stefano
>
>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
>
>
prev parent reply other threads:[~2022-05-12 7:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 7:43 [PATCH] vhost-backend: do not depend on CONFIG_VHOST_VSOCK Paolo Bonzini
2022-05-12 7:47 ` Stefano Garzarella [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220512074720.wuuj3xalykejiqpx@sgarzare-redhat \
--to=sgarzare@redhat.com \
--cc=dovmurik@linux.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).