diff options
author | Richard Henderson | 2021-02-12 19:48:47 +0100 |
---|---|---|
committer | Peter Maydell | 2021-02-16 12:04:53 +0100 |
commit | c7169b022b329a121d0c7acb550a08efa04d816a (patch) | |
tree | 44da53572b4e3ee2c859b498a4e67acc643c6ce4 /linux-user/hppa | |
parent | exec: Rename guest_{addr,range}_valid to *_untagged (diff) | |
download | qemu-c7169b022b329a121d0c7acb550a08efa04d816a.tar.gz qemu-c7169b022b329a121d0c7acb550a08efa04d816a.tar.xz qemu-c7169b022b329a121d0c7acb550a08efa04d816a.zip |
linux-user: Use cpu_untagged_addr in access_ok; split out *_untagged
Provide both tagged and untagged versions of access_ok.
In a few places use thread_cpu, as the user is several
callees removed from do_syscall1.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210212184902.1251044-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/hppa')
-rw-r--r-- | linux-user/hppa/cpu_loop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index 944511bbe4..3aaaf3337c 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -35,7 +35,7 @@ static abi_ulong hppa_lws(CPUHPPAState *env) return -TARGET_ENOSYS; case 0: /* elf32 atomic 32bit cmpxchg */ - if ((addr & 3) || !access_ok(VERIFY_WRITE, addr, 4)) { + if ((addr & 3) || !access_ok(cs, VERIFY_WRITE, addr, 4)) { return -TARGET_EFAULT; } old = tswap32(old); @@ -50,9 +50,9 @@ static abi_ulong hppa_lws(CPUHPPAState *env) return -TARGET_ENOSYS; } if (((addr | old | new) & ((1 << size) - 1)) - || !access_ok(VERIFY_WRITE, addr, 1 << size) - || !access_ok(VERIFY_READ, old, 1 << size) - || !access_ok(VERIFY_READ, new, 1 << size)) { + || !access_ok(cs, VERIFY_WRITE, addr, 1 << size) + || !access_ok(cs, VERIFY_READ, old, 1 << size) + || !access_ok(cs, VERIFY_READ, new, 1 << size)) { return -TARGET_EFAULT; } /* Note that below we use host-endian loads so that the cmpxchg |