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: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly
Date: Fri, 10 Feb 2017 12:57:07 +0000
User-agent: mu4e 0.9.19; emacs 25.2.1

Paolo Bonzini <address@hidden> writes:

> 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.

I mean messy from the point of reading the code where we reverse a
sequence done from higher up in the call chain. Maybe I'm being overly
picky because we aren't exactly on a hot path here anyway.

--
Alex Bennée



reply via email to

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