diff options
-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); |