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: qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 4/7] target/arm: Make v7M exception entry stack push check MPU
Date: Sat, 3 Feb 2018 13:39:37 -0800	[thread overview]
Message-ID: <1f56786e-e492-b260-344c-7050d6b4c07f@linaro.org> (raw)
In-Reply-To: <CAFEAcA9xBQO-o8wV0bR1qK1PG23xbAAWtd-JdXqS0ao9N+f3mw@mail.gmail.com>

On 02/03/2018 01:30 PM, Peter Maydell wrote:
> On 3 February 2018 at 21:21, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>> On 01/30/2018 07:02 AM, Peter Maydell wrote:
>>> +    if (get_phys_addr(env, addr, MMU_DATA_STORE, mmu_idx, &physaddr,
>>> +                      &attrs, &prot, &page_size, &fi, NULL)) {
>>
>> Given that you know you're going to call this at least 8 times in a row,
>> probably with all operations on the same page, it is worth querying the qemu
>> tlb first, and when that fails but the lookup succeeds, installing the result
>> into the tlb?
> 
> get_phys_addr and address_space_stl_le don't touch the TLB though?

No, get_phys_addr is the primitive that tlb_fill uses.

> We could in theory do a get_phys_addr() once per-page rather than
> doing it all 8 times though, yes.

After I sent that first message I thought perhaps interacting with the proper
TLB is too/overly complicated.  We'd get nearly the same results just having a
local 1-entry cache.  Something like

    pagecache = -1;
    stacked_ok =
        v7m_stack_write(cpu, frameptr, env->regs[0],
                        &pagecache, mmu_idx, false) &&
        v7m_stack_write(cpu, frameptr + 4, env->regs[1],
                        &pagecache, mmu_idx, false) &&
        ...


r~

  reply	other threads:[~2018-02-03 21:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 15:02 [Qemu-devel] [PATCH 0/7] target/arm: Implement M profile derived exceptions Peter Maydell
2018-01-30 15:02 ` [Qemu-devel] [PATCH 1/7] target/arm: Add armv7m_nvic_set_pending_derived() Peter Maydell
2018-02-03 21:01   ` Richard Henderson
2018-01-30 15:02 ` [Qemu-devel] [PATCH 2/7] target/arm: Split "get pending exception info" from "acknowledge it" Peter Maydell
2018-02-03 21:06   ` Richard Henderson
2018-02-05 23:44   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-06  9:42     ` Peter Maydell
2018-01-30 15:02 ` [Qemu-devel] [PATCH 3/7] target/arm: Add ignore_stackfaults argument to v7m_exception_taken() Peter Maydell
2018-02-03 21:08   ` Richard Henderson
2018-01-30 15:02 ` [Qemu-devel] [PATCH 4/7] target/arm: Make v7M exception entry stack push check MPU Peter Maydell
2018-02-03 21:21   ` Richard Henderson
2018-02-03 21:30     ` Peter Maydell
2018-02-03 21:39       ` Richard Henderson [this message]
2018-02-03 21:32   ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-01-30 15:02 ` [Qemu-devel] [PATCH 5/7] target/arm: Make v7m_push_callee_stack() honour MPU Peter Maydell
2018-02-03 21:26   ` Richard Henderson
2018-02-05 23:48   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-01-30 15:02 ` [Qemu-devel] [PATCH 6/7] target/arm: Make exception vector loads honour the SAU Peter Maydell
2018-02-03 21:29   ` Richard Henderson
2018-01-30 15:02 ` [Qemu-devel] [PATCH 7/7] target/arm: Handle exceptions during exception stack pop Peter Maydell
2018-02-03 21:31   ` Richard Henderson

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=1f56786e-e492-b260-344c-7050d6b4c07f@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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).