qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 24/38] exec: check offset_within_address_space for r


From: Michael Roth
Subject: [Qemu-devel] [PATCH 24/38] exec: check offset_within_address_space for register subpage
Date: Wed, 25 Sep 2013 07:57:52 -0500

From: Hu Tao <address@hidden>

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: address@hidden
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: "Andreas Färber" <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Blue Swirl <address@hidden>
Signed-off-by: Hu Tao <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 88266249701032211c1d7449460d063fbc01bf12)

Signed-off-by: Michael Roth <address@hidden>
---
 exec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index 08eecb3..f6674e5 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.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]