[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu |
Date: |
Fri, 02 Sep 2016 13:04:50 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Benjamin Herrenschmidt <address@hidden> writes:
> On Fri, 2016-09-02 at 12:02 +0530, Nikunj A Dadhania wrote:
>> Signed-off-by: Nikunj A Dadhania <address@hidden>
>> ---
>> cputlb.c | 15 +++++++++++++++
>> include/exec/exec-all.h | 2 ++
>> target-ppc/mmu-hash64.c | 2 +-
>> 3 files changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/cputlb.c b/cputlb.c
>> index 64faf47..17ff58e 100644
>> --- a/cputlb.c
>> +++ b/cputlb.c
>> @@ -123,6 +123,21 @@ void tlb_flush(CPUState *cpu, int flush_global)
>> }
>> }
>>
>> +static void tlb_flush_all_async_work(CPUState *cpu, void *opaque)
>> +{
>> + tlb_flush_nocheck(cpu, GPOINTER_TO_INT(opaque));
>> +}
>> +
>> +void tlb_flush_all(CPUState *cpu, int flush_global)
>> +{
>> + CPUState *c;
>> +
>> + CPU_FOREACH(c) {
>> + async_run_on_cpu(c, tlb_flush_all_async_work,
>> + GUINT_TO_POINTER(flush_global));
>> + }
>> +}
>
> Hrm... this is asynchronous ?
Yes.
> It probably needs to be synchronous...
I see run_on_cpu() which seems suitable.
> We must provide a guarantee that no other processor can see the old
> translation when the tlb invalidation sequence completes. With the
> current lazy TLB flush, we already delay the invalidation until
> we hit that synchronization point so we need to be synchronous.
>> diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c
>> index 8118143..d852c21 100644
>> --- a/target-ppc/mmu-hash64.c
>> +++ b/target-ppc/mmu-hash64.c
>> @@ -912,7 +912,7 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu,
>> * invalidate, and we still don't have a tlb_flush_mask(env, n,
>> * mask) in QEMU, we just invalidate all TLBs
>> */
>> - tlb_flush(CPU(cpu), 1);
>> + tlb_flush_all(CPU(cpu), 1);
>> }
>>
>> void ppc_hash64_update_rmls(CPUPPCState *env)
Regards,
Nikunj
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, (continued)
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, David Gibson, 2016/09/07
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, Alex Bennée, 2016/09/07
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, David Gibson, 2016/09/11
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, Alex Bennée, 2016/09/12
- Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation, Benjamin Herrenschmidt, 2016/09/12
[Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/02
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/02
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu,
Nikunj A Dadhania <=
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Alex Bennée, 2016/09/04
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/04
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/04
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/05
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/05
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/06
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Benjamin Herrenschmidt, 2016/09/06
- Re: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu, Nikunj A Dadhania, 2016/09/06
Re: [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC, Cédric Le Goater, 2016/09/02