qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Czenczek <hreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Raphael Norwitz" <raphael.norwitz@nutanix.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	eperezma@redhat.com, "Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v2 2/3] vhost-backend: remove vhost_kernel_reset_device()
Date: Wed, 4 Oct 2023 12:48:47 +0200	[thread overview]
Message-ID: <228b7a27-1e16-dc9d-1a8e-1e69d2df2f77@redhat.com> (raw)
In-Reply-To: <20231004014532.1228637-3-stefanha@redhat.com>

On 04.10.23 03:45, Stefan Hajnoczi wrote:
> 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>
> ---
>   hw/virtio/vhost-backend.c | 6 ------
>   1 file changed, 6 deletions(-)

The obvious way would be to immediately call SET_OWNER again, but I 
assume that just like in vhost-user, it is probably pretty much left 
undefined what exactly should happen in the back-end on RESET_OWNER, and 
so I agree that in general, starting to call this function now when we 
didn’t before is more of a liability then anything.

Reviewed-by: Hanna Czenczek <hreitz@redhat.com>



  reply	other threads:[~2023-10-04 10:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04  1:45 [PATCH v2 0/3] vhost: clean up device reset Stefan Hajnoczi
2023-10-04  1:45 ` [PATCH v2 1/3] vhost-user: do not send RESET_OWNER on " Stefan Hajnoczi
2023-10-04 10:44   ` Hanna Czenczek
2023-10-04 11:15     ` Stefan Hajnoczi
2023-10-04 12:23       ` Hanna Czenczek
2023-10-04  1:45 ` [PATCH v2 2/3] vhost-backend: remove vhost_kernel_reset_device() Stefan Hajnoczi
2023-10-04 10:48   ` Hanna Czenczek [this message]
2023-10-04  1:45 ` [PATCH v2 3/3] virtio: call ->vhost_reset_device() during reset Stefan Hajnoczi
2023-10-04 11:04   ` Hanna Czenczek
2023-10-04  2:07 ` [PATCH v2 0/3] vhost: clean up device reset Raphael Norwitz

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=228b7a27-1e16-dc9d-1a8e-1e69d2df2f77@redhat.com \
    --to=hreitz@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=fam@euphon.net \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael.norwitz@nutanix.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /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).