qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Luke Gorrie <luke@snabb.co>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Marcel Apfelbaum <marcel.a@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.4] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"
Date: Tue, 2 Aug 2016 20:32:35 +0300	[thread overview]
Message-ID: <20160802202706-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAA2XHbdv221os1nTuF6e4MdRoMaqeKWedD14E54okACwt1NeUg@mail.gmail.com>

On Tue, Aug 02, 2016 at 11:42:01AM +0200, Luke Gorrie wrote:
> Hi Michael & all,
> 
> On 4 August 2015 at 21:00, Luke Gorrie <luke@snabb.co> wrote:
> 
>     Hi Michael,
> 
>     Sorry I didn't see this mail sooner -
> 
>     On 30 July 2015 at 10:36, Michael S. Tsirkin <mst@redhat.com> wrote:
> 
>         This reverts commit 294ce717e0f212ed0763307f3eab72b4a1bdf4d0.
> 
>         vhost stop happens e.g. when guest unloads the driver,
>         so closing the backend connection is not the right
>         thing to do here.
> 
>         VHOST_RESET_OWNER should happen on vhost_dev_cleanup - it's
>         the counterpart of VHOST_SET_OWNER.
> 
>         Cc: Luke Gorrie <luke@snabb.co>
>         Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>         ---
> 
>         I think we need this in 2.4 to avoid introducing regressions
>         in the protocol. We'll fix properly in 2.5.
>         Luke, can you comment please?
> 
> 
>     Interesting. Currently we don't have a test case in Snabb Switch CI for
>     guests reloading drivers. We need to add that and let you know how it goes.
> 
> 
> We have this test case now. Took a year to add, almost to the day, but here we
> are :-).
> 
> Specifically we have beefed up our CI for Snabb to run some tens of thousands
> of end-to-end tests with VMs nightly. This includes testing a bunch of
> different QEMU versions with a bunch of different Snabb (host) and DPDK (guest)
> versions. It also exercises the transition where the guest first initializes a
> Virtio-net device with the kernel driver and then later hands the device over
> to the DPDK driver.
> 
> The data we have now shows that this test case is only working reliably with
> QEMU 2.4.1. My hypothesis is that this QEMU version is sending the
> VHOST_RESET_OWNER when the kernel driver shuts down - so that vswitch knows not
> to process descriptors - while the other versions are skipping this (because
> the patch was not introduced yet, or because the patch was reverted).
> 
> Here is the full thread on Github, becoming more QEMU-oriented as you scroll
> down:
> https://github.com/snabbco/snabb/issues/976#issuecomment-236838883
> 
> So, question for QEMU upstream, is there currently a supported way for the host
> vswitch to detect when the vrings are invalid? How should we operate to be safe
> from serving garbage DMA requests during guest driver resets and reboots?
> 
> Cheers and sorry for the e-mail latency :-)
> -Luke
> 
> 


I think this is adequately answered here:
http://git.qemu.org/?p=qemu.git;a=blob;f=docs/specs/vhost-user.txt;hb=HEAD#l149

HTH

-- 
MST

  reply	other threads:[~2016-08-02 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  8:36 [Qemu-devel] [PATCH for-2.4] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop" Michael S. Tsirkin
2015-08-04 19:00 ` Luke Gorrie
2015-08-04 20:36   ` Michael S. Tsirkin
2015-08-06  9:33     ` Luke Gorrie
2016-08-02  9:42   ` Luke Gorrie
2016-08-02 17:32     ` Michael S. Tsirkin [this message]
2016-08-10 13:50       ` Luke Gorrie

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=20160802202706-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=luke@snabb.co \
    --cc=marcel.a@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).