[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/43] memory: fix rendering of a region obscured by
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 12/43] memory: fix rendering of a region obscured by another |
Date: |
Mon, 3 Dec 2012 16:08:36 -0600 |
From: Avi Kivity <address@hidden>
The memory core drops regions that are hidden by another region (for example,
during BAR sizing), but it doesn't do so correctly if the lower address of the
existing range is below the lower address of the new range.
Example (qemu-system-mips -M malta -kernel vmlinux-2.6.32-5-4kc-malta
-append "console=ttyS0" -nographic -vga cirrus):
Existing range: 10000000-107fffff
New range: 100a0000-100bffff
Correct behaviour: drop new range
Incorrect behaviour: add new range
Fix by taking this case into account (previously we only considered
equal lower boundaries).
Tested-by: Aurelien Jarno <address@hidden>
Signed-off-by: Avi Kivity <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit d26a8caea3f160782841efb87b5e8bea606b512b)
Signed-off-by: Michael Roth <address@hidden>
---
memory.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/memory.c b/memory.c
index d528d1f..7144020 100644
--- a/memory.c
+++ b/memory.c
@@ -538,12 +538,12 @@ static void render_memory_region(FlatView *view,
offset_in_region += int128_get64(now);
int128_subfrom(&remain, now);
}
- if (int128_eq(base, view->ranges[i].addr.start)) {
- now = int128_min(remain, view->ranges[i].addr.size);
- int128_addto(&base, now);
- offset_in_region += int128_get64(now);
- int128_subfrom(&remain, now);
- }
+ now = int128_sub(int128_min(int128_add(base, remain),
+ addrrange_end(view->ranges[i].addr)),
+ base);
+ int128_addto(&base, now);
+ offset_in_region += int128_get64(now);
+ int128_subfrom(&remain, now);
}
if (int128_nz(remain)) {
fr.mr = mr;
--
1.7.9.5
- [Qemu-devel] [PATCH 02/43] fix CONFIG_QEMU_HELPERDIR generation again, (continued)
- [Qemu-devel] [PATCH 02/43] fix CONFIG_QEMU_HELPERDIR generation again, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 03/43] ui/vnc: Only report/use TIGHT_PNG encoding if enabled., Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 01/43] configure: Fix CONFIG_QEMU_HELPERDIR generation, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 04/43] vnc: fix "info vnc" with "-vnc ..., reverse=on", Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 05/43] uhci: Raise interrupt when requested even for non active tds, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 07/43] qxl: always update displaysurface on resize, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 06/43] hw/qxl: qxl_dirty_surfaces: use uintptr_t, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 08/43] rtc: fix overflow in mktimegm, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 10/43] target-i386: Allow tsc-frequency to be larger then 2.147G, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 09/43] hw: Fix return value check for bdrv_read, bdrv_write, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 12/43] memory: fix rendering of a region obscured by another,
Michael Roth <=
- [Qemu-devel] [PATCH 13/43] s390x: fix -initrd in virtio machine, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 11/43] e1000: drop check_rxov, always treat RX ring with RDH == RDT as empty, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 15/43] target-sparc64: disable VGA cirrus, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 16/43] xhci: fix usb name in caps, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 14/43] PPC: Bamboo: Fix memory size DT property, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 17/43] tools: initialize main loop before block layer, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 19/43] nbd: fixes to read-only handling, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 18/43] m68k: Return semihosting errno values correctly, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 20/43] mips/malta: fix CBUS UART interrupt pin, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 21/43] target-mips: fix wrong microMIPS opcode encoding, Michael Roth, 2012/12/03