From: Aurelien Jarno <aurelien@aurel32.net>
To: Jun Koi <junkoi2004@gmail.com>
Cc: Jan Kiszka <jan.kiszka@web.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] A bit optimization for tlb_set_page() (resend)
Date: Wed, 30 Jun 2010 20:31:35 +0200 [thread overview]
Message-ID: <20100630183135.GA24593@ohm.aurel32.net> (raw)
In-Reply-To: <v2zfdaac4d51005052236o40c1cd47kf871bf7649915a62@mail.gmail.com>
On Thu, May 06, 2010 at 02:36:59PM +0900, Jun Koi wrote:
> This patch avoids handling write watchpoints on read-only memory access.
> It also breaks the searching loop for watchpoint once the setup for
> handling watchpoint later is done.
>
> Signed-off-by: Jun Koi <junkoi2004@gmail.com>
Thanks, applied.
> diff --git a/exec.c b/exec.c
> index 14d1fd7..6fd859f 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2236,10 +2236,12 @@ void tlb_set_page(CPUState *env, target_ulong vaddr,
> watchpoint trap routines. */
> QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
> if (vaddr == (wp->vaddr & TARGET_PAGE_MASK)) {
> - iotlb = io_mem_watch + paddr;
> - /* TODO: The memory case can be optimized by not trapping
> - reads of pages with a write breakpoint. */
> - address |= TLB_MMIO;
> + /* Avoid trapping reads of pages with a write breakpoint. */
> + if ((prot & PAGE_WRITE) || (wp->flags & BP_MEM_READ)) {
> + iotlb = io_mem_watch + paddr;
> + address |= TLB_MMIO;
> + break;
> + }
> }
> }
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2010-06-30 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 5:36 [Qemu-devel] [PATCH] A bit optimization for tlb_set_page() (resend) Jun Koi
2010-05-08 18:53 ` [Qemu-devel] " Jan Kiszka
2010-06-30 18:31 ` Aurelien Jarno [this message]
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=20100630183135.GA24593@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=jan.kiszka@web.de \
--cc=junkoi2004@gmail.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).