From: Hu Tao <hutao@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH] exec: check offset_within_address_space for register subpage
Date: Thu, 29 Aug 2013 18:21:16 +0800 [thread overview]
Message-ID: <1377771676-6883-1-git-send-email-hutao@cn.fujitsu.com> (raw)
If offset_within_address_space falls in a page, then we register a
subpage. So check offset_within_address_space rather than
offset_within_region.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: "Andreas Färber" <afaerber@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index 3ca9381..f1f9151 100644
--- a/exec.c
+++ b/exec.c
@@ -869,7 +869,7 @@ static void mem_add(MemoryListener *listener, MemoryRegionSection *section)
now = remain;
if (int128_lt(remain.size, page_size)) {
register_subpage(d, &now);
- } else if (remain.offset_within_region & ~TARGET_PAGE_MASK) {
+ } else if (remain.offset_within_address_space & ~TARGET_PAGE_MASK) {
now.size = page_size;
register_subpage(d, &now);
} else {
--
1.8.1.4
next reply other threads:[~2013-08-29 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 10:21 Hu Tao [this message]
2013-09-03 10:54 ` [Qemu-devel] [PATCH] exec: check offset_within_address_space for register subpage Paolo Bonzini
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=1377771676-6883-1-git-send-email-hutao@cn.fujitsu.com \
--to=hutao@cn.fujitsu.com \
--cc=afaerber@suse.de \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).