summaryrefslogtreecommitdiffstats
path: root/cpu-exec.c
Commit message (Collapse)AuthorAgeFilesLines
* cpu-exec: Migrate some generic fns to cpu-exec-commonPeter Crosthwaite2015-09-161-59/+0
| | | | | | | | | | | | | The goal is to split the functions such that cpu-exec is CPU specific content, while cpus-exec-common.c is generic code only. The function interface to cpu-exec needs to be virtualised to prepare support for multi-arch and moving these definitions out saves bloating the QOM interface. So move these definitions out of cpu-exec to a new module, cpu-exec-common. Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-Id: <3cefeb3fbbb33031670951a0e74de2778529da3f.1441614289.git.crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-09-141-49/+70
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support for jemalloc * qemu_mutex_lock_iothread "No such process" fix * cutils: qemu_strto* wrappers * iohandler.c simplification * Many other fixes and misc patches. And some MTTCG work (with Emilio's fixes squashed): * Signal-free TCG kick * Removing spinlock in favor of QemuMutex * User-mode emulation multi-threading fixes/docs # gpg: Signature made Thu 10 Sep 2015 09:03:07 BST using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: (44 commits) cutils: work around platform differences in strto{l,ul,ll,ull} cpu-exec: fix lock hierarchy for user-mode emulation exec: make mmap_lock/mmap_unlock globally available tcg: comment on which functions have to be called with mmap_lock held tcg: add memory barriers in page_find_alloc accesses remove unused spinlock. replace spinlock by QemuMutex. cpus: remove tcg_halt_cond and tcg_cpu_thread globals cpus: protect work list with work_mutex scripts/dump-guest-memory.py: fix after RAMBlock change configure: Add support for jemalloc add macro file for coccinelle configure: factor out adding disas configure vhost-scsi: fix wrong vhost-scsi firmware path checkpatch: remove tests that are not relevant outside the kernel checkpatch: adapt some tests to QEMU CODING_STYLE: update mixed declaration rules qmp: Add example usage of strto*l() qemu wrapper cutils: Add qemu_strtoull() wrapper cutils: Add qemu_strtoll() wrapper ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * cpu-exec: fix lock hierarchy for user-mode emulationPaolo Bonzini2015-09-091-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | tb_lock has to be taken inside the mmap_lock (example: tb_invalidate_phys_range is called by target_mmap), but tb_link_page is taking the mmap_lock and it is called with the tb_lock held. To fix this, take the mmap_lock in tb_find_slow, not in tb_link_page. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * replace spinlock by QemuMutex.KONRAD Frederic2015-09-091-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode, so we can use QemuMutex directly, with an #ifdef. The #ifdef will be removed when multithreaded TCG will need the mutex as well. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-Id: <1439220437-23957-5-git-send-email-fred.konrad@greensocs.com> Signed-off-by: Emilio G. Cota <cota@braap.org> [Merge Emilio G. Cota's patch to remove volatile. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tcg: signal-free qemu_cpu_kickPaolo Bonzini2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signals are slow and do not exist on Win32. The previous patches have done most of the legwork to introduce memory barriers (some of them were even there already for the sake of Windows!) and we can now set the flags directly in the iothread. qemu_cpu_kick_thread is not used anymore on TCG, since the TCG thread is never outside usermode while the CPU is running (not halted). Instead run the content of the signal handler (now in qemu_cpu_kick_no_halt) directly. qemu_cpu_kick_no_halt is also used in qemu_mutex_lock_iothread to avoid the overhead of qemu_cond_broadcast. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tcg: synchronize exit_request and tcg_current_cpu accessesPaolo Bonzini2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Synchronize the remaining pair of accesses in cpu_signal. These should be necessary on Windows as well, at least in theory. Probably SuspendProcess and ResumeProcess introduce some implicit memory barrier. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tcg: synchronize cpu->exit_request and cpu->tcg_exit_req accessesPaolo Bonzini2015-09-091-1/+5
| | | | | | | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tcg: assign cpu->current_tb in a simpler placePaolo Bonzini2015-09-091-8/+2
| | | | | | | | | | | | | | | | | | TCG has not been reading cpu->current_tb from signal handlers for years. The code that synchronized cpu_exec with the signal handler is not needed anymore. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tcg: introduce tcg_current_cpuPaolo Bonzini2015-09-091-9/+5
| | | | | | | | | | | | | | | | | | | | This is already useful on Windows in order to remove tls.h, because accesses to current_cpu are done from a different thread on that platform. It will be used on POSIX platforms as soon TCG stops using signals to interrupt the execution of translated code. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | cpu-exec: introduce loop exit with restore functionPavel Dovgalyuk2015-09-111-0/+9
|/ | | | | | | | | | | This patch introduces loop exit function, which also restores guest CPU state according to the value of host program counter. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150710095702.13280.97477.stgit@PASHA-ISP> Signed-off-by: Richard Henderson <rth@twiddle.net>
* exec: drop cpu_can_do_io, just read cpu->can_do_ioPaolo Bonzini2015-08-141-1/+1
| | | | | | | | | | | | | | After commit 626cf8f (icount: set can_do_io outside TB execution, 2014-12-08), can_do_io is set to 1 if not executing code. It is no longer necessary to make this assumption in cpu_can_do_io. It is also possible to remove the use_icount test, simply by never setting cpu->can_do_io to 0 unless use_icount is true. With these changes cpu_can_do_io boils down to a read of cpu->can_do_io. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: Do not invalidate original TB in cpu_exec_nocache()Sergey Fedorov2015-08-061-6/+2
| | | | | | | | | | | | | Instead of invalidating an original TB in cpu_exec_nocache() prematurely, just save a link to it in the temporary generated TB. If cpu_io_recompile() is raised subsequently from the temporary TB, invalidate the original one as well. That allows reusing the original TB each time cpu_exec_nocache() is called to handle expired instruction counter in icount mode. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Message-Id: <1435656909-29116-1-git-send-email-serge.fdrv@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: Purge all uses of ENV_GET_CPU()Peter Crosthwaite2015-07-091-15/+13
| | | | | | | | | | | | | | | | Remove un-needed usages of ENV_GET_CPU() by converting the APIs to use CPUState pointers and retrieving the env_ptr as minimally needed. Scripted conversion for target-* change: for I in target-*/cpu.h; do sed -i \ 's/\(^int cpu_[^_]*_exec(\)[^ ][^ ]* \*s);$/\1CPUState *cpu);/' \ $I; done Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* include/exec: Move tb hash functions outPeter Crosthwaite2015-06-261-0/+1
| | | | | | | | | | | | | | | This is one of very few things in exec-all with a genuine CPU architecture dependency. Move these hashing helpers to a new header to trim exec-all.h down to a near architecture-agnostic header. The defs are only used by cpu-exec and translate-all which are both arch-obj's so the new tb-hash.h has no core code usage. Reviewed-by: Richard Henderson <rth@redhat.com> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-Id: <9d048b96f7cfa64a4d9c0b88e0dd2877fac51d41.1433052532.git.crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-02-241-0/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - vhost-scsi: add bootindex property - RCU: fix MemoryRegion lifetime issues in PCI; document the rules; convert of AddressSpaceDispatch and RAMList - KVM: add kvm_exit reasons for aarch64 # gpg: Signature made Mon Feb 16 16:32:32 2015 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (21 commits) Convert ram_list to RCU exec: convert ram_list to QLIST cosmetic changes preparing for the following patches exec: protect mru_block with RCU rcu: add g_free_rcu rcu: introduce RCU-enabled QLIST exec: RCUify AddressSpaceDispatch exec: make iotlb RCU-friendly exec: introduce cpu_reload_memory_map docs: clarify memory region lifecycle pci: split shpc_cleanup and shpc_free pcie: remove mmconfig memory leak and wrap mmconfig update with transaction memory: keep the owner of the AddressSpace alive until do_address_space_destroy rcu: run RCU callbacks under the BQL rcu: do not let RCU callbacks pile up indefinitely vhost-scsi: set the bootable value of channel/target/lun vhost-scsi: add a property for booting vhost-scsi: expose the TYPE_FW_PATH_PROVIDER interface vhost-scsi: add bootindex property qdev: support to get a device firmware path directly ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * exec: RCUify AddressSpaceDispatchPaolo Bonzini2015-02-161-1/+24
| | | | | | | | | | | | | | | | | | | | | | Note that even after this patch, most callers of address_space_* functions must still be under the big QEMU lock, otherwise the memory region returned by address_space_translate can disappear as soon as address_space_translate returns. This will be fixed in the next part of this series. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * exec: make iotlb RCU-friendlyPaolo Bonzini2015-02-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | After the previous patch, TLBs will be flushed on every change to the memory mapping. This patch augments that with synchronization of the MemoryRegionSections referred to in the iotlb array. With this change, it is guaranteed that iotlb_to_region will access the correct memory map, even once the TLB will be accessed outside the BQL. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * exec: introduce cpu_reload_memory_mapPaolo Bonzini2015-02-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This for now is a simple TLB flush. This can change later for two reasons: 1) an AddressSpaceDispatch will be cached in the CPUState object 2) it will not be possible to do tlb_flush once the TCG-generated code runs outside the BQL. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | cpu-exec: simplify icount codePaolo Bonzini2015-02-101-8/+3
| | | | | | | | | | | | | | | | Use MIN instead of an "if" statement. Move "tb" assignment where the value is actually used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | cpu-exec: drop dead assignmentPaolo Bonzini2015-02-101-1/+0
|/ | | | | | | | | All uses of TB inside cpu_exec are dominated by "tb = tb_find_fast(env)", and there are no uses after the switch statement. So the assignment is dead, as reported by Coverity. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* cpu-exec: simplify init_delay_paramsPaolo Bonzini2015-02-021-4/+2
| | | | | | | | | | | | | | | | | | | | | With the introduction of QEMU_CLOCK_VIRTUAL_RT, the computation of sc->diff_clk can be simplified nicely: qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + cpu_get_clock_offset() = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - cpu_get_clock_offset()) = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + timers_state.cpu_clock_offset) = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT) Cc: Sebastian Tanase <sebastian.tanase@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: simplify align_clocksPaolo Bonzini2015-02-021-2/+1
| | | | | | | | | sc->diff_clk is already equal to sleep_delay (split in a second and a nanosecond part). If you subtract sleep_delay - rem_delay, the result is exactly rem_delay. Cc: Sebastian Tanase <sebastian.tanase@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: invalidate nocache translation if they are interruptedPavel Dovgalyuk2014-12-151-1/+1
| | | | | | | | | In this case, QEMU might longjmp out of cpu-exec.c and miss the final cleanup in cpu_exec_nocache. Do this manually through a new compile flag. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* icount: set can_do_io outside TB executionPavel Dovgalyuk2014-12-151-0/+3
| | | | | | | | This patch sets can_do_io function to allow reading icount within cpu-exec, but outside TB execution. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: reset exception_index correctlyPavel Dovgalyuk2014-12-151-1/+2
| | | | | | | | | | Exception index is reset at every entry at every entry into cpu_exec() function. This may cause missing the exceptions while replaying them. This patch moves exception_index reset to the locations where they are processed. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: fix cpu_exec_nocachePavel Dovgalyuk2014-12-151-1/+6
| | | | | | | | | | | | | In icount mode cpu_exec_nocache function is used to execute part of the existing TB. At the end of cpu_exec_nocache newly created TB is deleted. Sometimes io_read function needs to recompile current TB and restart TB lookup and execution. After that tb_find_fast function finds old (bigger) TB again. This TB cannot be executed (because icount is not big enough) and cpu_exec_nocache is called again. Such a loop continues over and over. This patch deletes old TB and avoids finding it in the TB cache. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu-exec: Do CPU_INTERRUPT_HALT unconditionallyRichard Henderson2014-09-251-5/+0
| | | | | | | | | | The signal is currently checked by 10 targets, but only actually raised by Sparc and ARM. For the sake of one test-and-branch, we can handle this generic bit generically. Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-24-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-i386: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-64/+0
| | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-23-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-ppc: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-8/+0
| | | | | | | Cc: qemu-ppc@nongnu.org Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-22-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-lm32: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-7/+0
| | | | | | | | Cc: Michael Walle <michael@walle.cc> Signed-off-by: Richard Henderson <rth@twiddle.net> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1410626734-3804-21-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-microblaze: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-9/+0
| | | | | | | Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-20-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-mips: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-9/+0
| | | | | | | | | Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Tested-by: Leon Alrae <leon.alrae@imgtec.com> Message-id: 1410626734-3804-19-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-tricore: Remove the dummy interrupt boilerplateRichard Henderson2014-09-251-5/+0
| | | | | | | | | | It can go back in when it actually does something. Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-id: 1410626734-3804-18-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-openrisc: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-18/+0
| | | | | | | | Cc: Jia Liu <proljc@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Tested-by: Jia Liu <proljc@gmail.com> Message-id: 1410626734-3804-17-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-sparc: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-16/+0
| | | | | | | Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-16-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-arm: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-23/+0
| | | | | | | Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-15-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-unicore32: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-7/+0
| | | | | | | Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-14-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-sh4: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-5/+0
| | | | | | | Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-13-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-alpha: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-32/+0
| | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1410626734-3804-12-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-cris: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-21/+0
| | | | | | | | Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1410626734-3804-11-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-m68k: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-13/+0
| | | | | | | | | | Since do_interrupt_m68k_hardirq is no longer used outside op_helper.c, make it static. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-10-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-s390x: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-6/+0
| | | | | | | | Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-9-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-xtensa: Use cpu_exec_interrupt qom hookRichard Henderson2014-09-251-6/+0
| | | | | | | | Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Message-id: 1410626734-3804-8-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* qom: Add cpu_exec_interrupt hookRichard Henderson2014-09-251-5/+9
| | | | | | | | | | | Continuing the removal of ifdefs from cpu_exec. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-7-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-ppc: Use cpu_exec_enter qom hookRichard Henderson2014-09-251-3/+0
| | | | | | | | Cc: qemu-ppc@nongnu.org Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-6-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-m68k: Use cpu_exec_enter/exit qom hooksRichard Henderson2014-09-251-12/+1
| | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-5-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* target-i386: Use cpu_exec_enter/exit qom hooksRichard Henderson2014-09-251-12/+2
| | | | | | | | | | | Note that the code that was within the "exit" ifdef block was identical to the cpu_compute_eflags inline, so make that simplification at the same time. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-4-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* cpu-exec: Remove do-nothing ifdef chainsRichard Henderson2014-09-251-32/+0
| | | | | | | | | | | Around the cpu_exec_enter/exit hooks contain many empty ifdef blocks. Delete all of these to highlight those targets for which we actually need to do work. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-3-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* qom: Add cpu_exec_enter and cpu_exec_exit hooksRichard Henderson2014-09-251-7/+2
| | | | | | | | | | In preparation for removing a bunch of ifdefs from cpu_exec. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-2-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* cpu-exec: Make debug_excp_handler a QOM CPU methodPeter Maydell2014-09-121-10/+3
| | | | | | | Make the debug_excp_handler target specific hook into a QOM CPU method. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
OpenPOWER on IntegriCloud