qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler context
Date: Wed, 4 Apr 2018 10:07:34 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]