{"push_id":1046997146,"size":12,"distinct_size":12,"ref":"refs/heads/mttcg/base-patches-v2","head":"2bb6acb2c1c621fc8415512860af631b5df8ef33","before":"7b59137674f7ba850129a07b708ae1c7cfe8d545","commits":[{"sha":"8d859e833fd53094592f0e952760f0fdbd5c8687","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"tcg: move tb_invalidated_flag to CPUState\n\nThis is a baby step towards making tb_flush thread safe.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>\n[AJB: use bool]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv2\n  - use bool properly","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/8d859e833fd53094592f0e952760f0fdbd5c8687"},{"sha":"9d06ba295adc570aa69d39538df1c31551c0f730","author":{"email":"97ce1413105b2e68f811413f1ea07a68d9e5b40a@linaro.org","name":"Alex Bennée"},"message":"cpus: make all_vcpus_paused() return bool\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/9d06ba295adc570aa69d39538df1c31551c0f730"},{"sha":"b08749b4f616ec15a7b07aeb0f319a44a6c20037","author":{"email":"97ce1413105b2e68f811413f1ea07a68d9e5b40a@linaro.org","name":"Alex Bennée"},"message":"docs: new design document multi-thread-tcg.txt (DRAFTING)\n\nThis is a current DRAFT of a design proposal for upgrading TCG emulation\nto take advantage of modern CPUs by running a thread-per-CPU. The\ndocument goes through the various areas of the code affected by such a\nchange and proposes design requirements for each part of the solution.\n\nIt has been written *without* explicit reference to the current ongoing\nefforts to introduce this feature. The hope being we can review and\ndiscuss the design choices without assuming the current choices taken by\nthe implementation are correct.\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1\n  - initial version\nv2\n  - update discussion on locks\n  - bit more detail on vCPU scheduling\n  - explicitly mention Translation Blocks\n  - emulated hardware state already covered by iomutex","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/b08749b4f616ec15a7b07aeb0f319a44a6c20037"},{"sha":"fb55717d2620441fb2b5d052a4079bf28e78dc6a","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: move tb_find_fast outside the tb_lock critical section\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n[AJB: minor checkpatch fixes]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1(ajb)\n  - checkpatch fixes\nv2:\n  - re-basing fixes","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/fb55717d2620441fb2b5d052a4079bf28e78dc6a"},{"sha":"68c59251e09d996e0a7baa5014c2e5e0960846f9","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"tcg: comment on which functions have to be called with tb_lock held\n\nsoftmmu requires more functions to be thread-safe, because translation\nblocks can be invalidated from e.g. notdirty callbacks.  Probably the\nsame holds for user-mode emulation, it's just that no one has ever\ntried to produce a coherent locking there.\n\nThis patch will guide the introduction of more tb_lock and tb_unlock\ncalls for system emulation.\n\nNote that after this patch some (most) of the mentioned functions are\nstill called outside tb_lock/tb_unlock.  The next one will rectify this.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1(ajb):\n  - just s-o-b","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/68c59251e09d996e0a7baa5014c2e5e0960846f9"},{"sha":"dbdad2304b00dd9bc37d343b543e19a3cf6aa6dd","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: protect TBContext with tb_lock.\n\nThis protects TBContext with tb_lock to make tb_* thread safe.\n\nWe can still have issue with tb_flush in case of multithread TCG:\nanother CPU can be executing code during a flush.\n\nThis can be fixed later by making all other TCG thread exiting before calling\ntb_flush().\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nMessage-Id: <1439220437-23957-8-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n[AJB: moved into tree, clean-up history]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv2 (base-patches, ajb):\n  - re-base fixes\nv7 (FK, MTTCG):\n  - Drop a tb_lock in already locked restore_state_to_opc.\nv6 (FK, MTTCG):\n  - Drop a tb_lock arround tb_find_fast in cpu-exec.c.","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/dbdad2304b00dd9bc37d343b543e19a3cf6aa6dd"},{"sha":"5fd9bc91fbea7bf943e6ba9d468de690e72e6bf1","author":{"email":"97ce1413105b2e68f811413f1ea07a68d9e5b40a@linaro.org","name":"Alex Bennée"},"message":"target-arm/psci.c: wake up sleeping CPUs\n\nTesting with Alexander's bare metal syncronisation tests fails in MTTCG\nleaving one CPU spinning forever waiting for the second CPU to wake up.\nWe simply need to poke the halt_cond once we have processed the PSCI\npower on call.\n\nTested-by: Alex Bennée <alex.bennee@linaro.org>\nCC: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>\nMessage-Id: <1439220437-23957-20-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/5fd9bc91fbea7bf943e6ba9d468de690e72e6bf1"},{"sha":"c5e76ca44cc41e2ec945b29f2ef8769941797c00","author":{"email":"97ce1413105b2e68f811413f1ea07a68d9e5b40a@linaro.org","name":"Alex Bennée"},"message":"tcg: cpus rm tcg_exec_all()\n\nIn preparation for multi-threaded TCG we remove tcg_exec_all and move\nall the CPU cycling into the main thread function. When MTTCG is enabled\nwe shall use a separate thread function which only handles one vCPU.\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv2\n  - update timer calls to new API on rebase","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/c5e76ca44cc41e2ec945b29f2ef8769941797c00"},{"sha":"68ddbca8e751473c0a2086c3b82bc5f7ec1264ea","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: add options for enabling MTTCG\n\nWe know there will be cases where MTTCG won't work until additional work\nis done in the front/back ends to support. It will however be useful to\nbe able to turn it on.\n\nAs a result MTTCG will default to off unless the combination is\nsupported. However the user can turn it on for the sake of testing.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\n[AJB: move to -tcg mttcg=on/off, defaults]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1:\n  - merge with add mttcg option.\n  - update commit message\nv2:\n  - machine_init->opts_init","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/68ddbca8e751473c0a2086c3b82bc5f7ec1264ea"},{"sha":"160386884ea74da02ee8079cdbe6388ad7e0e042","author":{"email":"97ce1413105b2e68f811413f1ea07a68d9e5b40a@linaro.org","name":"Alex Bennée"},"message":"tcg: add kick timer for single-threaded vCPU emulation\n\nCurrently we rely on the side effect of the main loop grabbing the\niothread_mutex to give any long running basic block chains a kick to\nensure the next vCPU is scheduled. As this code is being re-factored and\nrationalised we now do it explicitly here.\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv2\n  - re-base fixes\n  - get_ticks_per_sec() -> NANOSECONDS_PER_SEC","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/160386884ea74da02ee8079cdbe6388ad7e0e042"},{"sha":"7c73b9e48a9bf7d1d00d44b323103b12bf22b4e2","author":{"email":"a5b45c9af271d077f30d36aa7d9b988eed9d56eb@siemens.com","name":"Jan Kiszka"},"message":"tcg: drop global lock during TCG code execution\n\nThis finally allows TCG to benefit from the iothread introduction: Drop\nthe global mutex while running pure TCG CPU code. Reacquire the lock\nwhen entering MMIO or PIO emulation, or when leaving the TCG loop.\n\nWe have to revert a few optimization for the current TCG threading\nmodel, namely kicking the TCG thread in qemu_mutex_lock_iothread and not\nkicking it in qemu_cpu_kick. We also need to disable RAM block\nreordering until we have a more efficient locking mechanism at hand.\n\nStill, a Linux x86 UP guest and my Musicpal ARM model boot fine here.\nThese numbers demonstrate where we gain something:\n\n20338 jan       20   0  331m  75m 6904 R   99  0.9   0:50.95 qemu-system-arm\n20337 jan       20   0  331m  75m 6904 S   20  0.9   0:26.50 qemu-system-arm\n\nThe guest CPU was fully loaded, but the iothread could still run mostly\nindependent on a second core. Without the patch we don't get beyond\n\n32206 jan       20   0  330m  73m 7036 R   82  0.9   1:06.00 qemu-system-arm\n32204 jan       20   0  330m  73m 7036 S   21  0.9   0:17.03 qemu-system-arm\n\nWe don't benefit significantly, though, when the guest is not fully\nloading a host CPU.\n\nMessage-Id: <1439220437-23957-10-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\n[EGC: fixed iothread lock for cpu-exec IRQ handling]\nSigned-off-by: Emilio G. Cota <cota@braap.org>\n[AJB: -smp single-threaded fix, rm old info from commit msg]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1 (ajb):\n  - SMP failure now fixed by previous commit\nChanges from Fred Konrad (mttcg-v7 via paolo):\n  * Rebase on the current HEAD.\n  * Fixes a deadlock in qemu_devices_reset().\n  * Remove the mutex in address_space_*\nv2 (ajb):\n  - merge with tcg: grab iothread lock in cpu-exec interrupt handling\n  - use existing fns for tracking lock state\n  - lock iothread for mem_region\n    - add assert on mem region modification\n    - ensure smm_helper holds iothread","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/7c73b9e48a9bf7d1d00d44b323103b12bf22b4e2"},{"sha":"2bb6acb2c1c621fc8415512860af631b5df8ef33","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: enable thread-per-vCPU\n\nThis allows the user to switch on multithread. However it defaults to\noff as individual front-end and back-ends need additional fixes. The\nfunction default_mttcg_enabled can be tweaked as support is added.\n\nAs assumptions about tcg_current_cpu are no longer relevant to the\nsingle-threaded kick routine we need to save the current information\nsomewhere else for the timer.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n[AJB: Some fixes, conditionally, commit rewording]\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv1 (ajb):\n  - fix merge conflicts\n  - maintain single-thread approach\nv2\n  - re-base fixes\n  - remove bogus break condition on cpu->stop/stopped\n  - only process exiting cpus exit_request\n  - handle all cpus idle case (fixes shutdown issues)","distinct":true,"url":"https://api.github.com/repos/stsquad/qemu/commits/2bb6acb2c1c621fc8415512860af631b5df8ef33"}]}