summaryrefslogtreecommitdiffstats
path: root/cpu-exec.c
Commit message (Collapse)AuthorAgeFilesLines
* TCG variable type checking.pbrook2008-11-171-3/+3
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5729 c046a42c-6fe2-441c-8c8c-71466251a162
* KVM: simplify kvm_cpu_exec hookaliguori2008-11-101-10/+2
| | | | | | | | | | | We don't need to use cpu_loop_exit() because we never use the condition codes so everything can be folded into a single case. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5669 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix interrupt exclusion via SSTEP_NOIRQmalc2008-11-061-2/+8
| | | | | | | | | | | | | | | | | Commit #5620 revealed an issue of the SSTEP_NOIRQ masking that was applied on all interrupt sources (including internal ones) when single stepping through the guest. Due to that commit, we now ended up in an infinite loop when CPU_INTERRUPT_EXIT was pending on SSTEP resume. That was due to #5620 eating all TBs while CPU_INTERRUPT_EXIT is pending, but SSTEP_NOIRQ preventing CPU_INTERRUPT_EXIT to be processed. What SSTEP_NOIRQ should actually do is to block the delivery of all external, guest visible interrupts. With the fix below applied, single stepping now works again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5643 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove unused reg_T2 definitionaurel322008-11-061-4/+0
| | | | | | | | | No longer used, remove it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5641 c046a42c-6fe2-441c-8c8c-71466251a162
* Add KVM support to QEMUaliguori2008-11-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add safety net against potential infinite loopmalc2008-11-041-0/+8
| | | | | | | | | | | | cpu_interrupt might be called while translating the TB, but before it is linked into a potentially infinite loop and becomes env->current_tb. Currently this can (and does) cause huge problems only when using dyntick clock, with other (periodic) clocks host_alarm_handler will eventually be executed resulting in a call to cpu_interrupt which will reset the recursion of running TB and the damage is "only" latency. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5620 c046a42c-6fe2-441c-8c8c-71466251a162
* Preliminary BSD user emulator supportblueswir12008-10-261-0/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5544 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Fix brk 8 and add S-flag emulation.edgar_igl2008-10-071-1/+1
| | | | | | | | | * break 8 sets ERP to the current insn. * First shot at S flag single-stepping. * Make it easier to use the local disasm. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5445 c046a42c-6fe2-441c-8c8c-71466251a162
* SH4: Privilege check for instructionsaurel322008-09-151-1/+4
| | | | | | | | | This patch adds check for all SH4 instructions which are executed only in privileged mode. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5224 c046a42c-6fe2-441c-8c8c-71466251a162
* Support for address maskingblueswir12008-07-171-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4882 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix r4641 (invalid token "=<" in a preprocessor expression)blueswir12008-07-081-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4859 c046a42c-6fe2-441c-8c8c-71466251a162
* Convert remaining __builtin_expect to likely/unlikely, by Jan Kiszka.ths2008-07-031-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4840 c046a42c-6fe2-441c-8c8c-71466251a162
* Spelling fixes, spotted by Stuart Brady.ths2008-06-301-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4809 c046a42c-6fe2-441c-8c8c-71466251a162
* Add instruction counter.pbrook2008-06-291-30/+63
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4799 c046a42c-6fe2-441c-8c8c-71466251a162
* More efficient target register / TC accesses.ths2008-06-271-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Emulate NMIs.edgar_igl2008-06-091-1/+9
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4719 c046a42c-6fe2-441c-8c8c-71466251a162
* Multithreaded locking fixes.pbrook2008-06-071-14/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Add the P flag to the tb dependent flags.edgar_igl2008-06-061-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4685 c046a42c-6fe2-441c-8c8c-71466251a162
* reworked SVM interrupt handling logic - fixed vmrun EIP saved value - ↵bellard2008-06-041-44/+45
| | | | | | reworked cr8 handling - added CPUState.hflags2 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4662 c046a42c-6fe2-441c-8c8c-71466251a162
* Restore ARM signal handler compilation on glibc < 2.5 (Blue Swirl).balrog2008-06-021-0/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4641 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove unused (for now) reg_REGWPTR (original patch by Glauber Costa)blueswir12008-05-291-13/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4617 c046a42c-6fe2-441c-8c8c-71466251a162
* SVM reworkbellard2008-05-281-1/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4605 c046a42c-6fe2-441c-8c8c-71466251a162
* removed unused codebellard2008-05-271-7/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4598 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Re-add the X flag to the tb flags, it allows for better code ↵edgar_igl2008-05-271-1/+1
| | | | | | generation and is practially always cleared. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4597 c046a42c-6fe2-441c-8c8c-71466251a162
* Move non-op functions from op_helper.c to helper.c and vice versa.blueswir12008-05-271-2/+3
| | | | | | | Rearrange interrupt handling to match other targets. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4590 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix Sparc32 compilation broken by r4484blueswir12008-05-191-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4499 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix Sparc64 host signal handlingblueswir12008-05-181-5/+10
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4484 c046a42c-6fe2-441c-8c8c-71466251a162
* Improved workaround for the annoying glibc global register mangling bugblueswir12008-05-171-47/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4465 c046a42c-6fe2-441c-8c8c-71466251a162
* Always process real timers regardless of singlestep mode (Jason Wessel).edgar_igl2008-05-151-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4462 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compilation on Sparc host, implement ld and stblueswir12008-05-141-5/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4457 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Improve TLB management and handle delayslots at page boundaries.edgar_igl2008-05-131-0/+1
| | | | | | | | | | * Dont flush the entire qemu tlb when the $pid changes. Instead we go through the guests TLB and choose entries that need to be flushed. * Add env->dslot and handle delayslots at pageboundaries. * Remove some unused code. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4450 c046a42c-6fe2-441c-8c8c-71466251a162
* use new helper namebellard2008-05-121-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4448 c046a42c-6fe2-441c-8c8c-71466251a162
* the double/triple fault handling was not tested in user mode.bellard2008-05-121-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4435 c046a42c-6fe2-441c-8c8c-71466251a162
* initial global prologue/epilogue implementationbellard2008-05-101-62/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4407 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compiler warnings in common filesblueswir12008-05-101-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4405 c046a42c-6fe2-441c-8c8c-71466251a162
* Debugger single step without interrupts (Jason Wessel).edgar_igl2008-05-091-1/+1
| | | | | | | | This patch allows the qemu backend debugger to single step an instruction without running the hardware interrupts. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4391 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Remove X flag from tb flags.edgar_igl2008-05-071-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4378 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix signal handler compilation on __arm__.balrog2008-05-061-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4359 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix crash due to invalid env->current_tb (Adam Lackorzynski, Paul Brook, me)blueswir12008-05-041-24/+44
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4317 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: Reduce the number of tb dependent flags.edgar_igl2008-05-031-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4305 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS updates:edgar_igl2008-05-021-1/+1
| | | | | | | | | | | | * Support both the I and D MMUs and improve the accuracy of the MMU model. * Handle the automatic user/kernel stack pointer switching when leaving or entering user mode. * Move the CCS evaluation into helper funcs. * Make sure user-mode cannot change flags only writeable in kernel mode. * More conversion of the translator into TCG. * Handle exceptions while in a delayslot. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4299 c046a42c-6fe2-441c-8c8c-71466251a162
* x86: Introduce CPU_INTERRUPT_NMIaurel322008-04-131-0/+6
| | | | | | | (Jan Kiszka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4205 c046a42c-6fe2-441c-8c8c-71466251a162
* HPPA (PA-RISC) host supportaurel322008-04-121-0/+29
| | | | | | | (Stuart Brady) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4199 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compiler warningsaurel322008-04-111-0/+4
| | | | | | | (Stefan Weil) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4188 c046a42c-6fe2-441c-8c8c-71466251a162
* * Add a model of the ETRAX interrupt controller.edgar_igl2008-03-141-5/+0
| | | | | | | | * Clean up the interrupt handling a bit. * Connect some NOR flash to the test board. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4055 c046a42c-6fe2-441c-8c8c-71466251a162
* reverted -translation option supportbellard2008-02-011-62/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3947 c046a42c-6fe2-441c-8c8c-71466251a162
* use the TCG code generatorbellard2008-02-011-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3944 c046a42c-6fe2-441c-8c8c-71466251a162
* Add option to disable TB cache, by Herve Poussineau.ths2008-01-231-1/+61
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3930 c046a42c-6fe2-441c-8c8c-71466251a162
* Partial fix to Sparc32 Linux host global register mangling problemblueswir12007-12-111-22/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3806 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix code generation buffer overflow reported by TeLeManblueswir12007-12-111-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3805 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud