- 11 7月, 2012 1 次提交
-
-
由 Christian Borntraeger 提交于
By default qemu will use MAP_PRIVATE for guest pages. This will write protect pages and thus break on s390 systems that dont support this feature. Therefore qemu has a hack to always use MAP_SHARED for s390. But MAP_SHARED has other problems (no dirty pages tracking, a lot more swap overhead etc.) Newer systems allow the distinction via KVM_CAP_S390_COW. With this feature qemu can use the standard qemu alloc if available, otherwise it will use the old s390 hack. Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com> Acked-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 29 6月, 2012 2 次提交
-
-
由 Juan Quintela 提交于
Always use accessors to read/set the dirty bitmap. Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Juan Quintela 提交于
Refactor the code that is only needed for tcg to an static function. Call that only when tcg is enabled. We can't refactor to a dummy function in the kvm case, as qemu can be compiled at the same time with tcg and kvm. Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 22 6月, 2012 1 次提交
-
-
由 Blue Swirl 提交于
Move logging functions from exec.c to qemu-log.c, compile it only once. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 18 6月, 2012 1 次提交
-
-
由 Anthony Liguori 提交于
This makes it easier to remove it from BusInfo. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> [AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 09 6月, 2012 1 次提交
-
-
由 Max Filippov 提交于
tb_invalidate_phys_addr has to be called with the exact physical address of the breakpoint we add/remove, not just the page's base address. Otherwise we easily fail to flush the right TB. This breakage was introduced by the commit f3705d53 "memory: make phys_page_find() return an unadjusted". This appeared to work for some guest architectures because their cpu_get_phys_page_debug implementation returns full translated physical address, not just the base of the TARGET_PAGE_SIZE-sized page. Reported-by: NTeLeMan <geleman@gmail.com> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 08 6月, 2012 1 次提交
-
-
由 Jan Kiszka 提交于
They could suggest that all TBs of the page containing the range would be invalidated. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 05 6月, 2012 1 次提交
-
-
由 Wen Congyang 提交于
This API will be used in the following patch. Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 19 5月, 2012 1 次提交
-
-
由 Alexander Graf 提交于
If we execute linux-user code that does the following: * A = mmap() * execute code in A * munmap(A) * B = mmap(), but mmap returns the same address as A * execute code in B we end up executing a stale cached tb that contains translated code from A, while we want new code from B. This patch adds a TB flush for mmap'ed regions, before we return them, avoiding the whole issue. It also adds a flush for munmap, so that we don't execute stale TBs instead of getting a segfault. Reported-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NRiku Voipio <riku.voipio@linaro.org> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 01 5月, 2012 4 次提交
-
-
由 Blue Swirl 提交于
Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Fold is_ram_rom and is_ram_rom_romd() into callers. Change is_romd() and section_addr() to take MemoryRegion instead of MemoryRegionSection for consistency and use memory_region_ prefix. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Move TLB handling and softmmu code load helpers to cputlb.c, compile only for softmmu targets. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Make s_cputlb_empty_entry 'const'. Rename tlb_flush_jmp_cache() to tb_flush_jmp_cache(). Refactor code to add cpu_tlb_reset_dirty_all(), memory_region_section_get_iotlb() and memory_region_is_unassigned(). Remove unused cpu_tlb_update_dirty(). Fix coding style in areas to be moved. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 16 4月, 2012 3 次提交
-
-
由 Stefan Weil 提交于
Replace all type casts to 'long' or 'unsigned long' by 'intptr_t' or 'uintptr_t'. For type casts which are only used to extract the lower bits of an address or to modify those bits, signedness does not matter. There I always use 'uintptr_t'. Signed-off-by: NStefan Weil <sw@weilnetz.de>
-
由 Stefan Weil 提交于
The MinGW-w64 compiler allows __attribute__((aligned (32)). Signed-off-by: NStefan Weil <sw@weilnetz.de>
-
由 Stefan Weil 提交于
w64 needs uintptr_t instead of unsigned long. For other hosts, nothing changes. Signed-off-by: NStefan Weil <sw@weilnetz.de>
-
- 14 4月, 2012 2 次提交
-
-
由 Max Filippov 提交于
Allow TB invalidation by its physical address, extract implementation from the breakpoint_invalidate function. Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Use uintptr_t instead of void * or unsigned long in several op related functions, env->mem_io_pc and GETPC() macro. Reviewed-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 07 4月, 2012 1 次提交
-
-
由 Stefan Weil 提交于
QEMU host addresses must use uintptr_t to be portable for hosts with an unusual size of long (w64). tb_jmp_offset is an uint16_t value, therefore the local variable offset in function tb_set_jmp_target was changed from unsigned long to uint16_t. The type cast to long in function tb_add_jump now also uses uintptr_t. For the bit operation used here, the signedness of the type cast does not matter. Some remaining unsigned long values are either only used for ARM assembler code or will be fixed in a later patch for PPC. v2: Fix signature of tb_find_pc in exec.c, too (hint from Blue Swirl, thanks). There remain lots of other long / unsigned long in exec.c which must be replaced by uintptr_t. This will be done in a separate patch. Here only one of these type casts is fixed. v3: Also fix signature of page_unprotect. Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 24 3月, 2012 1 次提交
-
-
由 Richard Henderson 提交于
This allows us to generate unwind info for the dynamicly generated code in the code_gen_buffer. Only i386 is converted at this point. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 20 3月, 2012 1 次提交
-
-
由 Anthony PERARD 提交于
In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is no longuer called with the ram addr we want to access, but only with the section address. This patch fixes this. (All other call to qemu_get_ram_ptr are already called with the right address.) This patch fixes Xen guest. Signed-off-by: NAnthony PERARD <anthony.perard@citrix.com> Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 19 3月, 2012 2 次提交
-
-
由 Avi Kivity 提交于
The code to get the ram_addr from a (tlb entry, vaddr) pair checks that the resulting memory is not MMIO, but neglects to check whether the region is hidden by a watchpoint page. Add the missing check. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
A couple of code paths check the lower bits of CPUTLBEntry::addr_write against io_mem_ram as a way of looking for a dirty RAM page. This works by accident since the value is zero, which matches all clear bits for TLB_INVALID, TLB_MMIO, and TLB_NOTDIRTY (indicating dirty RAM). Make it work by design by checking for the proper bits. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 18 3月, 2012 1 次提交
-
-
由 Blue Swirl 提交于
Optionally, make memory access helpers take a parameter for CPUState instead of relying on global env. On most targets, perform simple moves to reorder registers. On i386, switch from regparm(3) calling convention to standard stack-based version. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 15 3月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
Scripted conversion: for file in *.[hc] hw/*.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do sed -i "s/CPUState/CPUArchState/g" $file done All occurrences of CPUArchState are expected to be replaced by QOM CPUState, once all targets are QOM'ified and common fields have been extracted. Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 09 3月, 2012 3 次提交
-
-
由 Avi Kivity 提交于
The return value of cpu_register_io_memory() is no longer used anywhere, so we can remove it and all associated data and code. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
Instead of indirecting via io_mem_region, dispatch directly through the MemoryRegion obtained from the iotlb or phys_page_find(). Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
get_page_addr_code() reads a code tlb entry, but interprets it as an iotlb entry. This works by accident since the low bits of a RAM code tlb entry are clear, and match a RAM iotlb entry. This accident is about to unhappen, so fix the code to use an iotlb entry (using the code entry with TLB_MMIO may fail if the page is a watchpoint). Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 08 3月, 2012 2 次提交
-
-
由 Avi Kivity 提交于
A step towards eliminating io indices. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
We'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce section_addr(), which does the adjustment later. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 05 3月, 2012 1 次提交
-
-
由 Avi Kivity 提交于
Commit e58ac72b6a0 ("ioport: change portio_list not to use memory_region_set_offset()") started using aliases of I/O memory regions. Since the IORange used for the I/O was contained in the target region, the alias information (specifically, the offset into the region) was lost. This broke -vga std. Fix by allocating an independent object to hold the IORange and also the new offset. Note that I/O memory regions were conceptually broken wrt aliases in a different way: an alias can cause the same region to appear twice in an address space, but we had just one IORange to service it. This patch fixes that problem as well, since we can now have multiple IORange/MemoryRegion associations. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 29 2月, 2012 9 次提交
-
-
由 Avi Kivity 提交于
When storing large contiguous ranges in phys_map, all values tend to be the same pointers to a single MemoryRegionSection. Collapse them by marking nodes with level > 0 as leaves. This reduces tree memory usage dramatically. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
They have the same type, unify them. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
Setting multiple pages at once requires backtracking to previous nodes; easiest to achieve via recursion. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
By giving the function the value we want to set, we make it more flexible for the next patch. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
Instead of considering subpage on a per-page basis, split each section into a subpage head, multipage body, and subpage tail, and register each separately. This simplifies the registration functions. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
We'll change phys_page_find_alloc() soon, but phys_page_find() doesn't need to bear the consequences. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
We no longer describe memory in terms of individual pages; use sections throughout instead. PhysPageDesc no longer used - remove. Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Avi Kivity 提交于
This way, if we have several changes in a single transaction, we flush just once. Signed-off-by: NAvi Kivity <avi@redhat.com>
-