qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly


From: Pranith Kumar
Subject: Re: [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly
Date: Fri, 10 Feb 2017 08:59:26 -0500

On Fri, Feb 10, 2017 at 7:29 AM, Paolo Bonzini <address@hidden> wrote:

>
>
> On 10/02/2017 13:18, Alex Bennée wrote:
> >> I think you can unlock/lock the iothread here, and also call
> >
> > The iothread is already unlocked by this point (see tcg_cpu_exec).
>
> Is this patch on top of the MTTCG branch?  If not, cpu_handle_exception
> runs with the iothread lock taken doesn't it?
>
> >> cpu_exec_end/start to work around the limitation in start_exclusive.
> >
> > While that seems right it also seems very messy as it inverts the calls
> > so far. I fear we may end up very confused in special casing. Is there a
> > cleaner way we can unwind this?
>
> I'm not sure what is messy...  cpu_exec_start/end and
> start/end_exclusive are fundamentally a rwlock.
>
> Doing
>
>         cpu_exec_end
>         start_exclusive
>         ...
>         end_exclusive
>         cpu_exec_start
>
> simply means temporarily upgrading the lock from read to write.
>

This seems to be the simplest thing to do for now. I'll send a v2.

Thanks,
-- 
Pranith


reply via email to

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