Skip to content

RFC MTTCG: Slow-path for atomic insns

Alvise Rigo qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10exec: Introduce tcg_exclusive_{lock, unlock}()cpus.c exec.c include/qom/cpu.h+25 -06 replies
2/10softmmu_llsc_template.h: Move to multi-threadingsoftmmu_llsc_template.h softmmu_template.h target-arm/op_helper.c+21 -211 replies
3/10cpus: Introduce async_wait_run_on_cpu()cpus.c include/qom/cpu.h+73 -26 replies
4/10cputlb: Introduce tlb_flush_other()cputlb.c softmmu_llsc_template.h+24 -60 replies
5/10target-arm: End TB after ldrex instructiontarget-arm/translate-a64.c target-arm/translate.c+4 -00 replies
6/10cputlb: Add tlb_tables_flush_bitmap()cputlb.c+23 -70 replies
7/10cputlb: Query tlb_flush_by_mmuidxcputlb.c include/exec/exec-all.h target-arm/helper.c+62 -310 replies
8/10cputlb: Query tlb_flush_page_by_mmuidxcputlb.c include/exec/exec-all.h target-arm/helper.c+85 -450 replies
9/10cputlb: Query tlb_flush_page_allcputlb.c include/exec/exec-all.h target-arm/helper.c+14 -90 replies
10/10cpus: Do not sleep if some work item is pendingcpus.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC 00/10] MTTCG: Slow-path for atomic insns

Hi,

This series ports the latest iteration of the LL/SC work on top of the latest MTTCG reference branch posted recently by Alex.

These patches apply on top of the following series:

- [RFC v1 00/12] Enable MTTCG for 32 bit arm on x86
https://github.com/stsquad/qemu/tree/mttcg/enable-mttcg-for-armv7-v1
- [RFC v8 00/14] Slow-path for atomic instruction translation
https://git.virtualopensystems.com/dev/qemu-mt/tree/\
slowpath-for-atomic-v8-no-mttcg - only minor changes have been necessary
- Few recent patches from Emilio regarding the spinlock implementation

Overall, these patches allow the LL/SC infrastructure to work in multi-threaded mode (patches 01-02-04) and make TLB flushes to other VCPUs safe.

Patch 03 introduces a new API to submit a work item to a VCPU and wait for its completion. This API is used to query TLB flushes that result from the emulation of some ARM instructions. Patches 07, 08 and 09 modify the current tlb_flush_* functions to use the new API. Patch 10 fixes a rare hang that I was experiencing with this branch.

The whole work can be fetched from the following repository:
[email protected]:dev/qemu-mt.git
at the branch "slowpath-for-atomic-v8-mttcg".

Alvise Rigo (10):
exec: Introduce tcg_exclusive_{lock,unlock}() softmmu_llsc_template.h: Move to multi-threading
cpus: Introduce async_wait_run_on_cpu()
cputlb: Introduce tlb_flush_other()
target-arm: End TB after ldrex instruction
cputlb: Add tlb_tables_flush_bitmap()
cputlb: Query tlb_flush_by_mmuidx
cputlb: Query tlb_flush_page_by_mmuidx
cputlb: Query tlb_flush_page_all
cpus: Do not sleep if some work item is pending

 cpus.c                     |  48 ++++++++++-
 cputlb.c                   | 202 ++++++++++++++++++++++++++++++++++-----------
 exec.c                     |  18 ++++
 include/exec/exec-all.h    |  13 +--
 include/qom/cpu.h          |  36 ++++++++
 softmmu_llsc_template.h    |  13 ++-
 softmmu_template.h         |   6 ++
 target-arm/helper.c        |  79 +++++++++---------
 target-arm/op_helper.c     |   6 ++
 target-arm/translate-a64.c |   2 +
 target-arm/translate.c     |   2 +
 11 files changed, 327 insertions(+), 98 deletions(-)
Signature · 1 line
2.8.3