History | View | Annotate | Download (109.5 kB)
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
vmstate: port cpu_comon
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
microblaze: Trap on bus accesses to unmapped areas.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
kvm: Simplify cpu_synchronize_state()
cpu_synchronize_state() is a little unreadable since the 'modified'argument isn't self-explanatory. Simplify it by making it alwayssynchronize the kernel state into qemu, and automatically flush theregisters back to the kernel if they've been synchronized on this...
Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
Fix Sparse warnings: "Using plain integer as NULL pointer"
rename USE_NPTL to CONFIG_USE_NPTL
Remove setvbuf(<handle>, NULL, _IOLBF, 0) calls for Win32
On Win32 the setvbuf function requires the last parameter to be size between 2 and INT_MAX bytes, so the calls always failed. Since the whole point of the calls is to set line-buffered mode for the file handle and that's not supported on Win32 anyway, conditionally remove them....
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging:perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*
tlb flush cleanup
Use static empty variable s_cputlb_empty_entry to clear entries,also reset addend member when clearing entries.This helps running with valgrind/memcheck
Signed-off-by: igor.v.kovalenko@gmail.com
--Kind regards,Igor V. KovalenkoSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update to a hopefully more future proof FSF address
cpu_unregister_map_client: fix memory leak.
fix memory leak in cpu_unregister_map_client() and cpu_notify_map_clients().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Win32: Reduce section alignment for Windows.
Maximum alignment for Win32 is 16, so don't tryto set it to 32. Otherwise the compiler complains:
exec.c:102: warning: alignment of 'code_gen_prologue'is greater than maximum object file alignment. Using 16...
exec.c: remove unnecessary #if NB_MMU_MODES
remove unnecessary #if NB_MMU_MODES by using loop.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
provide cpu_index to env mapping
There are some people interested in, given a cpu number,pick its CPUState. KVM is an example, although not yet in tree.This patch provides a way of doing that.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Rearrange io_mem_init()
Move io_mem_init() downwards to avoid a forward declaration. No code change.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal thatshould dump core) a coredump file is created. This file issimilar than coredump generated by Linux (there are few exceptionsthough)....
fix gdbstub support for multiple threads in usermode, v3
When debugging multi-threaded programs, QEMU's gdb stub would report thecorrect number of threads (the qfThreadInfo and qsThreadInfo packets).However, the stub was unable to actually switch between threads (the T...
kvm: Rework dirty bitmap synchronization
Extend kvm_physical_sync_dirty_bitmap() so that is can sync acrossmultiple slots. Useful for updating the whole dirty log duringmigration. Moreover, properly pass down errors the whole call chain.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
kvm: Add missing bits to support live migration
This patch adds the missing hooks to allow live migration in KVM mode.It adds proper synchronization before/after saving/restoring the VCPUstates (note: PPC is untested), hooks intocpu_physical_memory_set_dirty_tracking() to enable dirty memory logging...
Fix typos in comments in exec.c
This patch fixes several typos in comments in exec.c:
longet -> longer recommanded -> recommended ajustments -> adjustments inconsistancies -> inconsistencies phsical -> physical positionned -> positioned...
kvm: Avoid COW if KVM MMU is asynchronous
Avi Kivity wrote:
Suggest wrapping in a function and hiding it deep inside kvm-all.c.
Done in v2:
---------->
If the KVM MMU is asynchronous (kernel does not support MMU_NOTIFIER),we have to avoid COW for the guest memory. Otherwise we risk serious...
Remove cpu_get_io_memory_{read,write}.
Signed-off-by: Paul Brook <paul@codesourcery.com>
qemu: introduce qemu_cpu_kick (Marcelo Tosatti)
To notify cpu of pending interrupt.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7243 c046a42c-6fe2-441c-8c8c-71466251a162
added -numa cmdline parameter parser (Andre Przywara)
adds a -numa command line parameter and sets a QEMU global array withthe memory sizes. The CPU-to-node assignemnt is written into theCPUState. If no specific values for memory and CPUs are given,all resources will be split equally across all nodes....
kqemu: merge CONFIG_KQEMU and USE_KQEMU
Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
Implement dynamic guest ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7088 c046a42c-6fe2-441c-8c8c-71466251a162
Remove code phys_ram_base uses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7085 c046a42c-6fe2-441c-8c8c-71466251a162
Cleanup SPARC/TCX framebuffer allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7059 c046a42c-6fe2-441c-8c8c-71466251a162
Allow 5 mmu indexes.
This is necessary for alpha because it has 4 protection levels and pal mode.
Signed-off-by: Tristan Gingold <gingold@adacore.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7028 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some win32 compile warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6984 c046a42c-6fe2-441c-8c8c-71466251a162
ROM write access for debugging (Jan Kiszka)
Enhance cpu_memory_rw_debug so that it can write even to ROM regions.This allows to modify ROM via gdb (I see no point in denying this to theuser), and it will enable us to drop kvm_patch_opcode_byte().
Credits go to Avi for suggesting this....
Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
Guest debugging support for KVM (Jan Kiszka)
This is a backport of the guest debugging support for the KVMaccelerator that is now part of the KVM tree. It implements the reworkedKVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which isnot yet part of any mainline kernel but will probably be 2.6.30 stuff....
Use a dedicated function to request exit from execution loop
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6762 c046a42c-6fe2-441c-8c8c-71466251a162
Clear CPU_INTERRUPT_EXIT on VM load
CPU_INTERRUPT_EXIT is not set anymore in env->interrupt_request sincerevision 6728. Make sure the bit is cleared on VM load.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6756 c046a42c-6fe2-441c-8c8c-71466251a162
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
The _exit syscall is used for both thread termination in NPTL applications,and process termination in legacy applications. Try to guess which we wantbased on the presence of multiple threads.
Also implement locking when modifying the CPU list.
Signed-off-by: Paul Brook <paul@codesourcery.com>...
Fix race condition on access to env->interrupt_request
env->interrupt_request is accessed as the bit level from both main codeand signal handler, making a race condition possible even on CISC CPU.This causes freeze of QEMU under high load when running the dyntick...
Fix unassigned region offsets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6639 c046a42c-6fe2-441c-8c8c-71466251a162
Fix cpu_physical_memory_rw() for 64-bit I/O accesses
KVM uses cpu_physical_memory_rw() to access the I/O devices. When aread or write with a length of 8-byte is requested, it is split into 24-byte accesses.
This has been broken in revision 5849. After this revision, only the...
qemu: add cpu_unregister_io_memory and make io mem table index dynamic (Marcelo Tosatti)
So drivers can clear their mem io table entries on exit back to unassignedstate.
Also make the io mem index allocation dynamic.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Log reset events (Jan Kiszka)
Original idea&code by Kevin Wolf, split-up in two patches and added morearchs.
This patch introduces a flag to log CPU resets. Useful for tracingunexpected resets (such as those triggered by x86 triple faults).
Add map client retry notification (Avi Kivity)
The target memory mapping API may fail if the bounce buffer resourcesare exhausted. Add a notification mechanism to allow clients to retrythe mapping operation when resources become available again.
Add target memory mapping API (Avi Kivity)
Devices accessing large amounts of memory (as with DMA) will wish to obtaina pointer to guest memory rather than access it indirectly viacpu_physical_memory_rw(). Add a new API to convert target addresses tohost pointers....
global s/fflush(logfile)/qemu_log_flush()/ (Eduardo Habkost)
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6339 c046a42c-6fe2-441c-8c8c-71466251a162
Convert references to logfile/loglevel to use qemu_log*() macros
This is a large patch that changes all occurrences of logfile/loglevelglobal variables to use the new qemu_log*() macros.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Adopt cpu_copy to new breakpoint API (Jan Kaszka)
Latest changes to the cpu_breakpoint/watchpoint API broke cpu_copy. Thispatch fixes it by cloning the breakpoint and watchpoint listsappropriately.
Thanks to Lionel Landwerlin for pointing out.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>...
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
CRIS: Remove CRIS specific do_unassigned_access.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6140 c046a42c-6fe2-441c-8c8c-71466251a162
KVM: Coalesced MMIO support
MMIO exits are more expensive in KVM or Xen than in QEMU because theyinvolve, at least, privilege transitions. However, MMIO writeoperations can be effectively batched if those writes do not have sideeffects.
Good examples of this include VGA pixel operations when in a planar...
linux-user: Fix h2g usage in page_find_alloc
Paul's comment on my first approach to fix the h2g usage inpage_find_alloc finally open my eyes about what the code is actuallysupposed to do:
With the help of h2g_valid we can no cleanly check if a freshly allocate...
Cosmetic cleanups to previous patch.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5852 c046a42c-6fe2-441c-8c8c-71466251a162
Change MMIO callbacks to use offsets, not absolute addresses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
Fix the comment added in r5844.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5846 c046a42c-6fe2-441c-8c8c-71466251a162
arm: Reserve code buffer in memory range reachable for pc-relative branch.
Unfortunately this range is so narrow that I'm not sure if it makes moresense to always use memory load to pc kind of branch instead.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5844 c046a42c-6fe2-441c-8c8c-71466251a162
Use sys-queue.h for break/watchpoint managment (Jan Kiszka)
This switches cpu_break/watchpoint_* to TAILQ wrappers, simplifying thecode and also fixing a use after release issue incpu_break/watchpoint_remove_all.
vga optimization (Glauber Costa)
Hypervisors like KVM perform badly while doing mmio ona loop, because it'll generate an exit on each access.This is the case with VGA, which results in very badperformance.
In this patch, we map the linear frame buffer as RAM,...
Fix Windows build
ENOBUFS is not defined on Win32. Use ENOMEM instead which is more portable.
This was reported by Hervé Poussineau.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5749 c046a42c-6fe2-441c-8c8c-71466251a162
Introduce BP_CPU as a breakpoint type (Jan Kiszka)
Add another breakpoint/watchpoint type to BP_GDB: BP_CPU. This type isintended for hardware-assisted break/watchpoint emulations like the x86architecture requires.
To keep the highest priority for BP_GDB breakpoints, this type is...
Introduce BP_WATCHPOINT_HIT flag (Jan Kiszka)
When one watchpoint is hit, others might have triggered as well. Tosupport users of the watchpoint API which need to detect such cases,the BP_WATCHPOINT_HIT flag is introduced and maintained.
Remove premature memop TB terminations (Jan Kiszka)
Now that we can properly restore the pc on watchpoint hits, there is nomore need for prematurely terminating TBs if watchpoints are present.Remove all related bits.
Restore pc on watchpoint hits (Jan Kiszka)
In order to provide accurate information about the triggeringinstruction, this patch adds the required bits to restore the pc if theaccess happened inside a TB. With the BP_STOP_BEFORE_ACCESS flag, thewatchpoint user can control if the debug trap should be issued on or...
Respect length of watchpoints (Jan Kiszka)
This adds length support for watchpoints. To keep things simple, onlyaligned watchpoints are accepted.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
...
Refactor and enhance break/watchpoint API (Jan Kiszka)
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow thesucceeding enhancements this series comes with.
First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switchingto dynamically allocated data structures that are kept in linked lists....
Refactor translation block CPU state handling (Jan Kiszka)
This patch refactors the way the CPU state is handled that is associatedwith a TB. The basic motivation is to move more arch specific code outof generic files. Specifically the long #ifdef clutter in tb_find_fast()...
Fix -linux-user build by reverting r5701
Unfortunately, -linux-user doesn't use osdep as it replaces some of thosefunctions with specific ones. The code #ifdef code in exec.c needs toremain in place so instead of introducing a qemu_getpagesize() let's just...
Define OS-dependent qemu_getpagesize() (Hollis Blanchard)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5701 c046a42c-6fe2-441c-8c8c-71466251a162
Win32: Fix warnings
Attached patch fixes some warnings which only happen on Windows.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5639 c046a42c-6fe2-441c-8c8c-71466251a162
Add KVM support to QEMU
This patch adds very basic KVM support. KVM is a kernel module for Linux thatallows userspace programs to make use of hardware virtualization support. Itcurrent supports x86 hardware virtualization using Intel VT-x or AMD-V. It...
page_check_range: fix wrap around test (Lauro Ramos Venancio).
Move up the warp around test because line'end = TARGET_PAGE_ALIGN(start+len);'can interfere with it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5563 c046a42c-6fe2-441c-8c8c-71466251a162
Show size for unassigned accesses (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5436 c046a42c-6fe2-441c-8c8c-71466251a162
Add dirty tracking for live migration
This patch adds a dirty tracking bit for live migration. We use 0x08 becausekqemu uses 0x04.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5433 c046a42c-6fe2-441c-8c8c-71466251a162
Variable logfilename is not used outside exec.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5420 c046a42c-6fe2-441c-8c8c-71466251a162
Add some missing static qualifiers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5415 c046a42c-6fe2-441c-8c8c-71466251a162
Make CPULogItem tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5397 c046a42c-6fe2-441c-8c8c-71466251a162
Add missing parenthesis in qemu_ram_alloc()
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5392 c046a42c-6fe2-441c-8c8c-71466251a162
Allocate code gen buffer properly on FreeBSD
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5331 c046a42c-6fe2-441c-8c8c-71466251a162
64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)
Don't truncate code_gen_buffer_size calculation to int, as it will giveunpredicted results on 64 bit systems when booting large guests.
Signed-off-by: Jes Sorensen <jes@sgi.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
Make page_find() return 0 for too-large addresses (Eduardo Habkost)
On some cases, such as under KVM, tb_invalidate_phys_page_range()may be called for large addresses, when qemu is configured to more than4GB of RAM.
On these cases, qemu was crashing because it was using an index too...
Fix warnings that would be caused by gcc flag -Wwrite-strings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
Fix most warnings that would be caused by gcc flag -Wundef
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5173 c046a42c-6fe2-441c-8c8c-71466251a162
Fix a nit in exec.c, by Tristan Gingold.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5104 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
Map code buffers below 2G on Sparc64
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4951 c046a42c-6fe2-441c-8c8c-71466251a162
Link ARM prologue closer to code segment to avoid a build failure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4867 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid decremented overflow.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4862 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4819 c046a42c-6fe2-441c-8c8c-71466251a162
Move interrupt_request and user_mode_only to common cpu state.Save and restore env->interrupt_request and env->halted.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4817 c046a42c-6fe2-441c-8c8c-71466251a162
Spelling fixes, spotted by Stuart Brady.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4809 c046a42c-6fe2-441c-8c8c-71466251a162
Move CPU save/load registration to common code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4808 c046a42c-6fe2-441c-8c8c-71466251a162
Add instruction counter.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4799 c046a42c-6fe2-441c-8c8c-71466251a162
Use qemu_mallocz.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4711 c046a42c-6fe2-441c-8c8c-71466251a162
Prevent guest reusing host memory allocations.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4710 c046a42c-6fe2-441c-8c8c-71466251a162
Clean up MMIO TLB handling.The IO index is now stored in its own field, instead of being wedgedinto the vaddr field. This eliminates the ROMD and watchpoint hostpointer weirdness. The IO index space is expanded by 1 bit, andseveral additional bits are made available in the TLB vaddr field....