diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-03 13:51:19 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-03 13:51:19 -0500 |
commit | 3d0b7b5203fb07847bf13aee567a9c9d7483876b (patch) | |
tree | 0ba800353d5dafa74d354188aca0d87bae78bb1d | |
parent | aeb01d5f2c9a89c557adb0fb40bca15238f93124 (diff) | |
parent | c308efe63a875eb0d839f7490e69e58e4595466c (diff) | |
download | hqemu-3d0b7b5203fb07847bf13aee567a9c9d7483876b.zip hqemu-3d0b7b5203fb07847bf13aee567a9c9d7483876b.tar.gz |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
exec.c: Remove out of date comment
exec.c: Use subpages for large unaligned mappings
exec.c: Fix off-by-one error in register_subpage
socket: clean up redundant assignment
qom: Clean libuser object and dependency files
usb: Clean common object and dependency files
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | exec.c | 23 | ||||
-rw-r--r-- | qemu-sockets.c | 1 |
3 files changed, 12 insertions, 16 deletions
@@ -215,8 +215,8 @@ clean: rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -Rf .libs rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d - rm -f usb/*.o usb/*.d hw/*.o hw/*.d + rm -f qom/*.o qom/*.d libuser/qom/*.o libuser/qom/*.d + rm -f hw/usb/*.o hw/usb/*.d hw/*.o hw/*.d rm -f qemu-img-cmds.h rm -f trace/*.o trace/*.d rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp @@ -2240,14 +2240,6 @@ static void phys_sections_clear(void) phys_sections_nb = 0; } -/* register physical memory. - For RAM, 'size' must be a multiple of the target page size. - If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an - io memory page. The address used when calling the IO function is - the offset from the start of the region, plus region_offset. Both - start_addr and region_offset are rounded down to a page boundary - before calculating this offset. This should not be a problem unless - the low bits of start_addr and region_offset differ. */ static void register_subpage(MemoryRegionSection *section) { subpage_t *subpage; @@ -2271,7 +2263,7 @@ static void register_subpage(MemoryRegionSection *section) subpage = container_of(existing->mr, subpage_t, iomem); } start = section->offset_within_address_space & ~TARGET_PAGE_MASK; - end = start + section->size; + end = start + section->size - 1; subpage_register(subpage, start, end, phys_section_add(section)); } @@ -2305,10 +2297,15 @@ void cpu_register_physical_memory_log(MemoryRegionSection *section, remain.offset_within_address_space += now.size; remain.offset_within_region += now.size; } - now = remain; - now.size &= TARGET_PAGE_MASK; - if (now.size) { - register_multipage(&now); + while (remain.size >= TARGET_PAGE_SIZE) { + now = remain; + if (remain.offset_within_region & ~TARGET_PAGE_MASK) { + now.size = TARGET_PAGE_SIZE; + register_subpage(&now); + } else { + now.size &= TARGET_PAGE_MASK; + register_multipage(&now); + } remain.size -= now.size; remain.offset_within_address_space += now.size; remain.offset_within_region += now.size; diff --git a/qemu-sockets.c b/qemu-sockets.c index 668fa93..beb2bb6 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c @@ -284,7 +284,6 @@ int inet_connect_opts(QemuOpts *opts, Error **errp) inet_strfamily(e->ai_family), e->ai_canonname, uaddr, uport, strerror(errno)); closesocket(sock); - sock = -1; continue; } freeaddrinfo(res); |