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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly
Date: Fri, 10 Feb 2017 13:29:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


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.

Paolo



reply via email to

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