[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] target/ppc/excp_helper: Take BQL before calling c
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [PATCH] target/ppc/excp_helper: Take BQL before calling cpu_interrupt() |
Date: |
Thu, 15 Jun 2017 08:02:11 +0530 |
Alex Bennée <address@hidden> writes:
> Thomas Huth <address@hidden> writes:
>
>> Since the introduction of MTTCG, using the msgsnd instruction
>> abort()s if being called without holding the BQL. So let's protect
>> that part of the code now with qemu_mutex_lock_iothread().
>>
>> Buglink: https://bugs.launchpad.net/qemu/+bug/1694998
>> Signed-off-by: Thomas Huth <address@hidden>
>
> Reviewed-by: Alex Bennée <address@hidden>
>
> p.s. I was checking the ppc code for other CPU_FOREACH patterns and I
> noticed the tlb_flush calls could probably use the tlb_flush_all_cpus
> API instead of manually looping themselves.
Will that be synchronous call? In PPC, we do lazy tlb flush, the tlb
flushes are batched until a synchronization point (for optimization).
The batching is achieved using a tlb_need_flush (global/local) and when
there is isync/ptesync or an exception, the actual flush is done. At
this point we need to make sure that the flush is synchronous.
> You should also double check the semantics to make sure none of them
> need to use the _synced variant and a cpu_exit if the flush needs to
> complete w.r.t the originating CPU.
Regards,
Nikunj