diff options
author | Peter Maydell | 2017-08-08 14:42:52 +0200 |
---|---|---|
committer | Richard Henderson | 2017-09-07 20:15:55 +0200 |
commit | 6ad4d7eed05a1e23537fc92b50f898f5977f37e6 (patch) | |
tree | 68274ea648323ca49a2fcd96b65ff1a65e251ec7 /target/alpha/helper.c | |
parent | target/alpha: Convert to TranslatorOps (diff) | |
download | qemu-6ad4d7eed05a1e23537fc92b50f898f5977f37e6.tar.gz qemu-6ad4d7eed05a1e23537fc92b50f898f5977f37e6.tar.xz qemu-6ad4d7eed05a1e23537fc92b50f898f5977f37e6.zip |
target/alpha: Switch to do_transaction_failed() hook
Switch the alpha target from the old unassigned_access hook
to the new do_transaction_failed hook. This allows us to
resolve a ??? in the old hook implementation.
The only part of the alpha target that does physical
memory accesses is reading the page table -- add a
TODO comment there to the effect that we should handle
bus faults on page table walks. (Since the palcode
doesn't actually do anything useful on a bus fault anyway
it's a bit moot for now.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <1502196172-13818-1-git-send-email-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/alpha/helper.c')
-rw-r--r-- | target/alpha/helper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 34121f4cad..36407f77f5 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -163,6 +163,14 @@ static int get_physical_address(CPUAlphaState *env, target_ulong addr, pt = env->ptbr; + /* TODO: rather than using ldq_phys() to read the page table we should + * use address_space_ldq() so that we can handle the case when + * the page table read gives a bus fault, rather than ignoring it. + * For the existing code the zero data that ldq_phys will return for + * an access to invalid memory will result in our treating the page + * table as invalid, which may even be the right behaviour. + */ + /* L1 page table read. */ index = (addr >> (TARGET_PAGE_BITS + 20)) & 0x3ff; L1pte = ldq_phys(cs->as, pt + index*8); |