aboutsummaryrefslogtreecommitdiffstats
path: root/exec.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-18Respect length of watchpoints (Jan Kiszka)aliguori1-10/+20
This adds length support for watchpoints. To keep things simple, only aligned watchpoints are accepted. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5740 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18Refactor and enhance break/watchpoint API (Jan Kiszka)aliguori1-77/+118
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow the succeeding enhancements this series comes with. First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switching to dynamically allocated data structures that are kept in linked lists. This also allows to return a stable reference to the related objects, required for later introduced x86 debug register support. Breakpoints and watchpoints are stored with their full information set and an additional flag field that makes them easily extensible for use beyond pure guest debugging. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5738 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18Refactor translation block CPU state handling (Jan Kiszka)aliguori1-34/+22
This patch refactors the way the CPU state is handled that is associated with a TB. The basic motivation is to move more arch specific code out of generic files. Specifically the long #ifdef clutter in tb_find_fast() has to be overcome in order to avoid duplicating it for the gdb watchpoint fixes (patch "Restore pc on watchpoint hits"). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5736 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-11Fix -linux-user build by reverting r5701aliguori1-1/+10
Unfortunately, -linux-user doesn't use osdep as it replaces some of those functions with specific ones. The code #ifdef code in exec.c needs to remain in place so instead of introducing a qemu_getpagesize() let's just use getpagesize() in the non-Windows implementation of qemu_vmalloc. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5703 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-11Define OS-dependent qemu_getpagesize() (Hollis Blanchard)aliguori1-10/+1
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
2008-11-06Win32: Fix warningsaurel321-1/+0
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
2008-11-05Add KVM support to QEMUaliguori1-0/+4
This patch adds very basic KVM support. KVM is a kernel module for Linux that allows userspace programs to make use of hardware virtualization support. It current supports x86 hardware virtualization using Intel VT-x or AMD-V. It also supports IA64 VT-i, PPC 440, and S390. This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of QEMU. Even though this implementation is basic, it is significantly faster than TCG. Booting and shutting down a Linux guest: w/TCG: 1:32.36 elapsed 84% CPU w/KVM: 0:31.14 elapsed 59% CPU Right now, KVM is disabled by default and must be explicitly enabled with -enable-kvm. We can enable it by default later when we have had better testing. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-28page_check_range: fix wrap around test (Lauro Ramos Venancio).balrog1-3/+4
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
2008-10-06Show size for unassigned accesses (Robert Reif)blueswir11-12/+50
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5436 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06Add dirty tracking for live migrationaliguori1-2/+25
This patch adds a dirty tracking bit for live migration. We use 0x08 because kqemu uses 0x04. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5433 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05Variable logfilename is not used outside exec.cblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5420 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-04Add some missing static qualifiersblueswir11-7/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5415 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02Make CPULogItem tables constblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5397 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02Add missing parenthesis in qemu_ram_alloc()ths1-1/+1
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
2008-09-27Allocate code gen buffer properly on FreeBSDaliguori1-0/+22
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
2008-09-2464 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)aliguori1-1/+1
Don't truncate code_gen_buffer_size calculation to int, as it will give unpredicted 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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5310 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-20Suppress gcc 4.x -Wpointer-sign (included in -Wall) warningsblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-15Make page_find() return 0 for too-large addresses (Eduardo Habkost)aliguori1-6/+16
On some cases, such as under KVM, tb_invalidate_phys_page_range() may be called for large addresses, when qemu is configured to more than 4GB of RAM. On these cases, qemu was crashing because it was using an index too large for l1_map[], that supports only 32-bit addresses when compiling without CONFIG_USER_ONLY. 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@5227 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-14Fix warnings that would be caused by gcc flag -Wwrite-stringsblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-06Fix most warnings that would be caused by gcc flag -Wundefblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5173 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-29Fix a nit in exec.c, by Tristan Gingold.ths1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5104 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-17Fix some warnings that would be generated by gcc -Wmissing-prototypesblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-26Map code buffers below 2G on Sparc64blueswir11-6/+14
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4951 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-10Link ARM prologue closer to code segment to avoid a build failureblueswir11-1/+13
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4867 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-09Avoid decremented overflow.pbrook1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4862 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-01Fix typo.pbrook1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4819 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-01Move interrupt_request and user_mode_only to common cpu state.pbrook1-0/+29
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
2008-06-30Spelling fixes, spotted by Stuart Brady.ths1-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4809 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30Move CPU save/load registration to common code.pbrook1-0/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4808 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-29Add instruction counter.pbrook1-29/+118
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4799 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09Use qemu_mallocz.pbrook1-2/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4711 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09Prevent guest reusing host memory allocations.pbrook1-2/+26
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4710 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09Clean up MMIO TLB handling.pbrook1-119/+113
The IO index is now stored in its own field, instead of being wedged into the vaddr field. This eliminates the ROMD and watchpoint host pointer weirdness. The IO index space is expanded by 1 bit, and several additional bits are made available in the TLB vaddr field. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4704 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-08Remove dead and bitrotten "qemu-fast" code.pbrook1-128/+10
Only build softmmu+MMIO handlers for system emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4695 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-07Multithreaded locking fixes.pbrook1-2/+11
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-02Multithreaded locking for mmap().pbrook1-1/+19
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4654 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-31Mark host brk() area as reserved.pbrook1-0/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4637 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-30kqemu API change - allow use of kqemu with 32 bit QEMU on a 64 bit hostbellard1-0/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4628 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-29Fix rounding error.pbrook1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4615 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-29keep static code gen buffer for user mode - mark user mode reserved pages ↵bellard1-5/+29
after all big allocations git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4611 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-28variable dynamic translation buffer sizebellard1-18/+68
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4600 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-24Dont try to keep the tlb and the jmp cache synchronized.edgar_igl1-3/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4557 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-24Dynamically allocate tbs. Avoids branch range problems on RISC hosts.pbrook1-1/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4555 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-23removed warningbellard1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4539 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-23TCG profiler clean upbellard1-39/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4538 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-17Add support for the 'k' (kill) and 'D' (detach) packets (Jason Wessel).edgar_igl1-0/+21
Implement the 'k' gdbserial packet which kills the qemu instance via the debugger stub. Implement the 'D' detach packet for the gdb stub such that you can disconnect gdb with the "detach" command. This required implementing a cpu_breakpoint_remove_all() and a cpu_watchpoint_remove_all() function to cleanup all the breakpoints and watchpoints prior to leaving the gdb stub else simulation can stop with no debugger attached. On a '?' packet remove all the breakpoints and watchpoints. This is considered more of a safety net in case you force killed gdb or it crashed and you are reconnecting. The identical behavior exists for kgdb in the linux kernel. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4478 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-15cpu_abort() is really an abortbellard1-5/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4458 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-10initial global prologue/epilogue implementationbellard1-16/+28
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4407 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-06Make sure we flush cached blocks from the tb-jmp-cache when we replace valid ↵edgar_igl1-8/+20
tlb entries. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4352 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-03Do not attempt to set page flags for pages outside target address spaceblueswir11-0/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4310 c046a42c-6fe2-441c-8c8c-71466251a162