qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH] target/arm: Handle page table walk load failures


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH] target/arm: Handle page table walk load failures correctly
Date: Fri, 15 Dec 2017 18:24:53 +0000

On 15 December 2017 at 16:24, Peter Maydell <address@hidden> 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 <address@hidden>
> ---
> 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



reply via email to

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