qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andrey Ryabinin <arbn@yandex-team.com>
Cc: Raphael Norwitz <raphael.norwitz@nutanix.com>,
	Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
	"open list:Block layer core" <qemu-block@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Yongji Xie <xieyongji@baidu.com>, Chai Wen <chaiwen@baidu.com>,
	Ni Xun <nixun@baidu.com>,
	"d-tatianin@yandex-team.com" <d-tatianin@yandex-team.com>,
	"yc-core@yandex-team.com" <yc-core@yandex-team.com>,
	"vsementsov@yandex-team.com" <vsementsov@yandex-team.com>,
	"cohuck@redhat.com" <cohuck@redhat.com>
Subject: Re: [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests
Date: Tue, 18 Apr 2023 12:46:01 -0400	[thread overview]
Message-ID: <20230418124519-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <03b8f48d-b4a0-ca8f-064b-5fd937e376cc@yandex-team.com>

On Tue, Apr 18, 2023 at 06:37:04PM +0200, Andrey Ryabinin wrote:
> On 4/18/23 07:13, Raphael Norwitz wrote:
> > Hey Andrey - apologies for the late reply here.
> > 
> > It sounds like you are dealing with a buggy guest, rather than a QEMU issue.
> 
> No arguing here, the guest is buggy.
> However, the issue with QEMU is that virtio-blk tolerate such buggy guest
> while vhost-user-blk is not.
> We've been using virtio-blk in our cloud for a while and recently started switching to vhost-user-blk
> which led us to discover this problem.
> 
> >> On Apr 10, 2023, at 11:39 AM, Andrey Ryabinin <arbn@yandex-team.com> wrote:
> >>
> >>
> >>
> >> On 4/10/23 10:35, Andrey Ryabinin wrote:
> >>> Some guests hang on boot when using the vhost-user-blk-pci device,
> >>> but boot normally when using the virtio-blk device. The problem occurs
> >>> because the guest advertises VIRTIO_F_VERSION_1 but kicks the virtqueue
> >>> before setting VIRTIO_CONFIG_S_DRIVER_OK, causing vdev->start_on_kick to
> > 
> > Virtio 1.1 Section 3.1.1, says during setup “[t]he driver MUST NOT notify the device before setting DRIVER_OK.”
> > 
> > Therefore what you are describing is buggy guest behavior. Sounds like the driver should be made to either
> > - not advertise VIRTIO_F_VERSION_1
> > - not kick before setting VIRTIO_CONFIG_S_DRIVER_OK
> > 
> > If anything, the virtio-blk virtio_blk_handle_output() function should probably check start_on_kick?
> > 
> 
> Ideally this should have been done from the start. But if we do it now we'll just break these guests.

The problem with hacks like this is the problem proliferates.  What are
those guests and how hard are they to fix?

-- 
MST



      reply	other threads:[~2023-04-18 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10  8:35 [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests Andrey Ryabinin
2023-04-10 15:39 ` Andrey Ryabinin
2023-04-18  5:13   ` Raphael Norwitz
2023-04-18  6:17     ` Michael S. Tsirkin
2023-04-18 17:20       ` Andrey Ryabinin
2023-04-21  8:06         ` Michael S. Tsirkin
2023-04-18 16:37     ` Andrey Ryabinin
2023-04-18 16:46       ` Michael S. Tsirkin [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=20230418124519-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arbn@yandex-team.com \
    --cc=chaiwen@baidu.com \
    --cc=cohuck@redhat.com \
    --cc=d-tatianin@yandex-team.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=nixun@baidu.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael.norwitz@nutanix.com \
    --cc=vsementsov@yandex-team.com \
    --cc=xieyongji@baidu.com \
    --cc=yc-core@yandex-team.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).