qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemuarm@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 02/16] accel/tcg: Add probe_access_flags
Date: Fri, 17 Apr 2020 17:05:46 -0700	[thread overview]
Message-ID: <15117d04-55d4-9e7f-c601-04dc3b1b17c4@linaro.org> (raw)
In-Reply-To: <CAFEAcA9VQyq0jZGWOJ-kTpM7QfF8Uqg7_tVUDpvjsc=Kv9nSjQ@mail.gmail.com>

On 4/16/20 4:54 AM, Peter Maydell wrote:
>> -    target_ulong tlb_addr;
>> -    size_t elt_ofs;
>> -    int wp_access;
>> -
>> -    g_assert(-(addr | TARGET_PAGE_MASK) >= size);
>> -
>> -    switch (access_type) {
>> -    case MMU_DATA_LOAD:
>> -        elt_ofs = offsetof(CPUTLBEntry, addr_read);
>> -        wp_access = BP_MEM_READ;
>> -        break;
>> -    case MMU_DATA_STORE:
>> -        elt_ofs = offsetof(CPUTLBEntry, addr_write);
>> -        wp_access = BP_MEM_WRITE;
>> -        break;
>> -    case MMU_INST_FETCH:
>> -        elt_ofs = offsetof(CPUTLBEntry, addr_code);
>> -        wp_access = BP_MEM_READ;
>> -        break;
>> -    default:
>> -        g_assert_not_reached();
>> -    }
>> -    tlb_addr = tlb_read_ofs(entry, elt_ofs);
>> -
>> -    if (unlikely(!tlb_hit(tlb_addr, addr))) {
>> -        if (!victim_tlb_hit(env, mmu_idx, index, elt_ofs,
>> -                            addr & TARGET_PAGE_MASK)) {
>> -            tlb_fill(env_cpu(env), addr, size, access_type, mmu_idx, retaddr);
>> -            /* TLB resize via tlb_fill may have moved the entry. */
>> -            index = tlb_index(env, mmu_idx, addr);
>> -            entry = tlb_entry(env, mmu_idx, addr);
>> -        }
>> -        tlb_addr = tlb_read_ofs(entry, elt_ofs);
>> -    }
> 
> All of the code above seems to have disappeared in this
> refactoring -- it's not in probe_access_internal()
> but it hasn't moved to the new probe_access().

It's certainly still there.  I think this is diff being a bit daft.  There were
2 copies of this code before -- in probe_access and tlb_vaddr_to_host.


>> +void *probe_access(CPUArchState *env, target_ulong addr, int size,
>> +                   MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
>> +{
>> +    void *host;
>> +
>> +    g_assert(-(addr | TARGET_PAGE_MASK) >= size);
>> +    probe_access_flags(env, addr, access_type, mmu_idx, false, &host, retaddr);
>> +    return host;
>>  }
> 
> probe_access() used to pass the 'size' argument through to
> page_check_range() and cc->tlb_fill(); after this refactoring
> it no longer does that.

Seems I've fixed this in my tree since posting v2 -- probe_access now uses
probe_access_internal directly.  Anyway, definitely fixed for the next round.


r~


  reply	other threads:[~2020-04-18  0:06 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  6:44 [PATCH 00/16] target/arm: sve load/store improvements Richard Henderson
2020-03-11  6:44 ` [PATCH 01/16] accel/tcg: Add block comment for probe_access Richard Henderson
2020-04-16 11:50   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 02/16] accel/tcg: Add probe_access_flags Richard Henderson
2020-03-12  4:33   ` [PATCH v2 " Richard Henderson
2020-04-16 11:54     ` Peter Maydell
2020-04-18  0:05       ` Richard Henderson [this message]
2020-03-12  4:38   ` [PATCH " Richard Henderson
2020-03-11  6:44 ` [PATCH 03/16] exec: Add cpu_probe_watchpoint Richard Henderson
2020-04-16 12:08   ` Peter Maydell
2020-04-18  2:14     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 04/16] target/arm: Use cpu_*_data_ra for sve_ldst_tlb_fn Richard Henderson
2020-04-16 12:19   ` Peter Maydell
2020-04-18  2:16     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 05/16] target/arm: Drop manual handling of set/clear_helper_retaddr Richard Henderson
2020-04-16 12:23   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 06/16] target/arm: Add sve infrastructure for page lookup Richard Henderson
2020-04-16 13:03   ` Peter Maydell
2020-04-18  3:11     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 07/16] target/arm: Adjust interface of sve_ld1_host_fn Richard Henderson
2020-04-16 13:16   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 08/16] target/arm: Use SVEContLdSt in sve_ld1_r Richard Henderson
2020-04-16 13:26   ` Peter Maydell
2020-04-18  3:41     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 09/16] target/arm: Handle watchpoints " Richard Henderson
2020-04-16 13:29   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 10/16] target/arm: Use SVEContLdSt for multi-register contiguous loads Richard Henderson
2020-04-16 13:35   ` Peter Maydell
2020-04-18  3:26     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 11/16] target/arm: Update contiguous first-fault and no-fault loads Richard Henderson
2020-04-16 14:15   ` Peter Maydell
2020-04-18  3:36     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 12/16] target/arm: Use SVEContLdSt for contiguous stores Richard Henderson
2020-04-16 14:18   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 13/16] target/arm: Reuse sve_probe_page for gather first-fault loads Richard Henderson
2020-04-16 14:23   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 14/16] target/arm: Reuse sve_probe_page for scatter stores Richard Henderson
2020-04-16 14:25   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 15/16] target/arm: Reuse sve_probe_page for gather loads Richard Henderson
2020-04-16 14:21   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 16/16] target/arm: Remove sve_memopidx Richard Henderson
2020-04-16 14:27   ` Peter Maydell
2020-03-11  7:10 ` [PATCH 00/16] target/arm: sve load/store improvements no-reply
2020-04-16 14:28 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15117d04-55d4-9e7f-c601-04dc3b1b17c4@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemuarm@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).