qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>, Peter Xu <peterx@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Fam Zheng" <famz@redhat.com>,
	qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler context
Date: Wed, 4 Apr 2018 10:07:34 -0500	[thread overview]
Message-ID: <3d6c0d02-60ab-3501-611e-cd5f881d59e3@redhat.com> (raw)
In-Reply-To: <20180404142220.GT4467@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

On 04/04/2018 09:22 AM, Stefan Hajnoczi wrote:
> On Tue, Apr 03, 2018 at 01:01:15PM +0800, Peter Xu wrote:
>> Eric Auger reported the problem days ago that OOB broke ARM when running
>> with libvirt:
>>
>> http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html
>>
>> This patch fixes the problem.
>>
>> It's not really needed now since we have turned OOB off now, but it's
>> still a bug fix, and it'll start to work when we turn OOB on for ARM.
>>
>> The problem was that the monitor dispatcher bottom half was bound to
>> qemu_aio_context, but that context seems to be for block only.
> 
> No, it is not block-only.  iohandler_ctx is for the legacy
> qemu_set_fd_handler() API only and modern code should use
> qemu_aio_context.
> 
> The difference between qemu_aio_context and iohandler_ctx is that
> aio_poll(qemu_aio_context) does not process iohandler_ctx (since it's a
> difference context).  That is the legacy behavior that
> qemu_set_fd_handler() expects and it's implemented by keeping a separate
> iohandler_ctx.

Do I need to put a hold on my pull request while we come to a better
understanding of root cause, or is this patch still okay to include?

> 
>> For the
>> rest of the QEMU world we should be using iohandler context.  So
>> assigning monitor dispatcher bottom half to that context.
> 
> This patch relies on the side-effect that iohandler_ctx is only called
> later by the main loop, which seems to prevent the crash below.
> 
> What is the actual crash/problem?  You mentioned the GIC, but what does
> that have to do with monitor code crashing?
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2018-04-04 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  5:01 [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler context Peter Xu
2018-04-03  7:02 ` Peter Xu
2018-04-03  8:40 ` Fam Zheng
2018-04-03 13:02 ` Eric Blake
2018-04-04  0:39   ` Peter Xu
2018-04-04 14:22 ` Stefan Hajnoczi
2018-04-04 15:07   ` Eric Blake [this message]
2018-04-05 12:34     ` Stefan Hajnoczi
2018-04-08  5:14       ` Peter Xu
2018-04-08  5:12   ` Peter Xu
2018-04-09  7:00     ` Stefan Hajnoczi
2018-04-10  3:08 ` Stefan Hajnoczi

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=3d6c0d02-60ab-3501-611e-cd5f881d59e3@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --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).