Skip to content

Commit

Permalink
mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well
Browse files Browse the repository at this point in the history
Let's call it also for CONFIG_USER_ONLY. While at it, add a FIXME and get
rid of one local variable.

MIPS code probably needs a bigger refactoring in regards of
ensure_writable_pages(), similar to s390x, so for example, watchpoints
can be handled reliably later. The actually accessed addresses should
be probed only, not full pages.

Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20190826075112.25637-6-david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
davidhildenbrand authored and rth7680 committed Sep 3, 2019
1 parent ca86cf3 commit 3a9576e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions target/mips/op_helper.c
Expand Up @@ -4537,16 +4537,14 @@ static inline void ensure_writable_pages(CPUMIPSState *env,
int mmu_idx,
uintptr_t retaddr)
{
#if !defined(CONFIG_USER_ONLY)
target_ulong page_addr;
/* FIXME: Probe the actual accesses (pass and use a size) */
if (unlikely(MSA_PAGESPAN(addr))) {
/* first page */
probe_write(env, addr, 0, mmu_idx, retaddr);
/* second page */
page_addr = (addr & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE;
probe_write(env, page_addr, 0, mmu_idx, retaddr);
addr = (addr & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE;
probe_write(env, addr, 0, mmu_idx, retaddr);
}
#endif
}

void helper_msa_st_b(CPUMIPSState *env, uint32_t wd,
Expand Down

0 comments on commit 3a9576e

Please sign in to comment.