qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Cc: "patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH] target/arm: Handle page table walk load failures correctly
Date: Fri, 15 Dec 2017 18:24:53 +0000	[thread overview]
Message-ID: <CAFEAcA-0AxnDEnr6YcRGPMkNE5smgU3Rt+V5_jex9Z_vkFuWPA@mail.gmail.com> (raw)
In-Reply-To: <1513355076-5075-1-git-send-email-peter.maydell@linaro.org>

On 15 December 2017 at 16:24, Peter Maydell <peter.maydell@linaro.org> wrote:
> Instead of ignoring the response from address_space_ld*()
> (indicating an attempt to read a page table descriptor from
> an invalid physical address), use it to report the failure
> correctly.
>
> Since this is another couple of locations where we need to
> decide the value of the ARMMMUFaultInfo ea bit based on a
> MemTxResult, we factor out that operation into a helper
> function.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Now we've fixed the get-phys-addr functions to always report
> errors via the ARMMMUFaultInfo struct, it's pretty easy to
> detect and report external aborts on translation table walks.

Reading through the Arm ARM for an unrelated reason, I discovered
that this patch is necessary but not sufficient, because
external aborts on translation table walks for ATS instructions
are supposed to be reported as Data Aborts (unlike other
kinds of translation fault) -- see DDI0487B.a section D4.2.11.
So this patch is OK (reporting the abort in the PAR is no
worse than ignoring it completely and using a zero descriptor
value) but we should add another one after it that makes
do_ats_write() special-case fi->type == ARMFault_SyncExternal
and generate an exception.

I won't get to that until next year, though. (Need to
look up the various architecture versions to check whether
they all behave the same here.)

thanks
-- PMM

      parent reply	other threads:[~2017-12-15 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 16:24 [Qemu-devel] [PATCH] target/arm: Handle page table walk load failures correctly Peter Maydell
2017-12-15 16:57 ` Philippe Mathieu-Daudé
2017-12-15 18:24 ` Peter Maydell [this message]

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=CAFEAcA-0AxnDEnr6YcRGPMkNE5smgU3Rt+V5_jex9Z_vkFuWPA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=patches@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).