qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Aleksandar Rikalo <arikalo@wavecomp.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Aleksandar Markovic <amarkovic@wavecomp.com>
Subject: Re: [Qemu-devel] [PATCH v2 5/7] mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well
Date: Wed, 28 Aug 2019 16:07:20 -0700	[thread overview]
Message-ID: <2385aa4b-0d67-b6f2-d346-ac66e896f988@linaro.org> (raw)
In-Reply-To: <20190826075112.25637-6-david@redhat.com>

Pinging the mips maintainers.

r~

On 8/26/19 12:51 AM, David Hildenbrand wrote:
> 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>
> ---
>  target/mips/op_helper.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
> index 34bcc8d884..08d9a4f9f1 100644
> --- a/target/mips/op_helper.c
> +++ b/target/mips/op_helper.c
> @@ -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,
> 



  reply	other threads:[~2019-08-28 23:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  7:51 [Qemu-devel] [PATCH v2 0/7] tcg: probe_write() refactorings David Hildenbrand
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 1/7] s390x/tcg: Use guest_addr_valid() instead of h2g_valid() in probe_write_access() David Hildenbrand
2019-08-28  7:15   ` Cornelia Huck
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 2/7] s390x/tcg: Fix length calculation " David Hildenbrand
2019-08-28  7:19   ` Cornelia Huck
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 3/7] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code David Hildenbrand
2019-08-26 14:22   ` Richard Henderson
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 4/7] tcg: Enforce single page access in probe_write() David Hildenbrand
2019-08-26 14:22   ` Richard Henderson
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 5/7] mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well David Hildenbrand
2019-08-28 23:07   ` Richard Henderson [this message]
2019-08-29  8:10   ` Aleksandar Markovic
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 6/7] hppa/tcg: Call probe_write() also for CONFIG_USER_ONLY David Hildenbrand
2019-08-26  7:51 ` [Qemu-devel] [PATCH v2 7/7] s390x/tcg: Pass a size to probe_write() in do_csst() David Hildenbrand
2019-08-27 16:09 ` [Qemu-devel] [qemu-s390x] [PATCH v2 0/7] tcg: probe_write() refactorings David Hildenbrand
2019-08-27 16:58   ` Richard Henderson
2019-08-29 16:16     ` Richard Henderson

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=2385aa4b-0d67-b6f2-d346-ac66e896f988@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=david@redhat.com \
    --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).