qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 12/16] cputlb: Handle TLB_NOTDIRTY in probe_access


From: Alex Bennée
Subject: Re: [PATCH v4 12/16] cputlb: Handle TLB_NOTDIRTY in probe_access
Date: Wed, 25 Sep 2019 17:21:53 +0100
User-agent: mu4e 1.3.4; emacs 27.0.50

Richard Henderson <address@hidden> writes:

> We can use notdirty_write for the write and
> return a valid host pointer for this case.

nit: reflow the text

>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  accel/tcg/cputlb.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index 09b0df87c6..d0bdef1eb3 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -1167,16 +1167,24 @@ void *probe_access(CPUArchState *env, target_ulong 
> addr, int size,
>          return NULL;
>      }
>
> -    /* Handle watchpoints.  */
> -    if (tlb_addr & TLB_WATCHPOINT) {
> -        cpu_check_watchpoint(env_cpu(env), addr, size,
> -                             env_tlb(env)->d[mmu_idx].iotlb[index].attrs,
> -                             wp_access, retaddr);
> -    }
> +    if (unlikely(tlb_addr & TLB_FLAGS_MASK)) {
> +        CPUIOTLBEntry *iotlbentry =
> &env_tlb(env)->d[mmu_idx].iotlb[index];

I was going to say we compute this early but I'm assuming the compiler
can figure that out if it needs to.

Reviewed-by: Alex Bennée <address@hidden>


--
Alex Bennée



reply via email to

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