From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC v3 0/3] scsi: restart dma after vm change state handlers
Date: Thu, 30 May 2019 10:52:49 +0200 [thread overview]
Message-ID: <20190530085249.GB4890@linux.fritz.box> (raw)
In-Reply-To: <2666245b-7873-dc66-4af0-6b9c1eaa445d@redhat.com>
Am 30.05.2019 um 10:27 hat Paolo Bonzini geschrieben:
> On 30/05/19 00:10, Kevin Wolf wrote:
> > I don't think this is as nice because stopping or resuming a device
> > could involve some async operation (e.g. be delegated to a BH). In this
> > case, a device on a child bus must still wait for the BH (or other async
> > part) to be completed before it can resume its own operation.
> >
> > Basically, a single flat list of global VM state handlers wasn't a good
> > design, because what we actually need in such cases is something
> > hierarchical.
>
> So add an AioContext state change handler?
Does anything really change for the AioContext that could cause a
callback? As I read the code, only the virtio-scsi device state really
changes and it doesn't do more with the AioContext than just taking the
lock for a while.
But in any case, inferring whether the HBA is ready from some AioContext
state change, even if it were technically possible, is rather indirect
and more a hack than a proper solution in my book. So a callback from
the HBA to its bus feels like the correct approach.
Kevin
prev parent reply other threads:[~2019-05-30 8:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 18:36 [Qemu-devel] [RFC v3 0/3] scsi: restart dma after vm change state handlers Stefan Hajnoczi
2019-05-24 18:36 ` [Qemu-devel] [RFC v3 1/3] virtio: add vdc->vmchange_state() callback Stefan Hajnoczi
2019-05-24 18:36 ` [Qemu-devel] [RFC v3 2/3] scsi: add scsi_bus_dma_restart() Stefan Hajnoczi
2019-05-24 18:36 ` [Qemu-devel] [RFC v3 3/3] virtio-scsi: fix iothread deadlock on 'cont' Stefan Hajnoczi
2019-05-24 18:47 ` [Qemu-devel] [RFC v3 0/3] scsi: restart dma after vm change state handlers Paolo Bonzini
2019-05-24 19:08 ` Michael S. Tsirkin
2019-05-29 22:10 ` Kevin Wolf
2019-05-30 8:27 ` Paolo Bonzini
2019-05-30 8:52 ` Kevin Wolf [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=20190530085249.GB4890@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=fam@euphon.net \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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).