From: Leon Alrae <leon.alrae@imgtec.com>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH 0/9] mips: implement Inter-Thread Communication Unit
Date: Wed, 3 Feb 2016 16:56:42 +0000 [thread overview]
Message-ID: <1454518611-26134-1-git-send-email-leon.alrae@imgtec.com> (raw)
Inter-Thread Communication Unit (ITU) provides ITC storage which is a
gating storage mechanism for efficient communication and data transfer
between threads.
Each 64-bit location or "cell" within ITC space appears at multiple
consecutive addresses, or "views", distinguished by bits [6:3] of the
load/store target address. Each view can have distinct semantics. For
example in some views a load from a cell which is empty causes the
thread issuing the load to be blocked until the cell is written to
by a store from another thread.
In this implementation there are two kinds of storage cells (four-entry
FIFO queues and single-entry Semaphore cells) and six views (Bypass,
Control, E/F Synchronized, E/F Try, P/V Synchronized and P/V Try).
ITU object contains two memory regions: ITC Storage which is memory-mapped
and ITC Configuration Tags which are accessible directly from the CPU via
Cache instruction. Guest can remap the ITC storage by writing into ITC
Configuration Tags.
If thread is supposed to be blocked then it is marked as halted and it exits
the cpu loop. On the wake-up the thread will be restarted from the last
instruction.
This patchset does not implement Gating Storage exceptions. Also it does not
implement the behaviour of SC instruction which should indicate
success/failure of the access in E/F Try view.
In QEMU the ITU is available to any multi-threaded CPU, i.e. 34Kf and
MIPS64R6-generic. Therefore this patchset applies on to top of the other
patch introducing R6 multi-threading support.
This feature has been divided into the following patches:
* patches 1 and 2: define an ITU object and initial data structures
* patches 3-6: implement ITC Views
* patch 7: add ITC block to malta board
* patch 8: minor fix for Cache instruction in R6
* patch 9: make changes in the CPU to access ITC Tags
Feedback is welcome!
Thanks,
Leon
Leon Alrae (9):
hw/mips: implement ITC Configuration Tags
hw/mips: add ITC Storage Cells
hw/mips: implement ITC Storage - Control View
hw/mips: implement ITC Storage - Empty/Full Sync and Try Views
hw/mips: implement ITC Storage - P/V Sync and Try Views
hw/mips: implement ITC Storage - Bypass View
hw/mips_malta: make ITU available to multi-threading processors
target-mips: check CP0 enabled for CACHE instruction also in R6
target-mips: make ITC Configuration Tags accessible to the CPU
default-configs/mips-softmmu.mak | 1 +
default-configs/mips64-softmmu.mak | 1 +
default-configs/mips64el-softmmu.mak | 1 +
default-configs/mipsel-softmmu.mak | 1 +
hw/mips/mips_malta.c | 53 ++++
hw/misc/Makefile.objs | 1 +
hw/misc/mips_itu.c | 515 +++++++++++++++++++++++++++++++++++
include/hw/misc/mips_itu.h | 72 +++++
target-mips/cpu.h | 8 +-
target-mips/helper.h | 3 +
target-mips/op_helper.c | 40 ++-
target-mips/translate.c | 63 ++++-
12 files changed, 747 insertions(+), 12 deletions(-)
create mode 100644 hw/misc/mips_itu.c
create mode 100644 include/hw/misc/mips_itu.h
--
2.1.0
next reply other threads:[~2016-02-03 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 16:56 Leon Alrae [this message]
2016-02-03 16:56 ` [Qemu-devel] [PATCH 1/9] hw/mips: implement ITC Configuration Tags Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 2/9] hw/mips: add ITC Storage Cells Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 3/9] hw/mips: implement ITC Storage - Control View Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 4/9] hw/mips: implement ITC Storage - Empty/Full Sync and Try Views Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 5/9] hw/mips: implement ITC Storage - P/V " Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 6/9] hw/mips: implement ITC Storage - Bypass View Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 7/9] hw/mips_malta: make ITU available to multi-threading processors Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 8/9] target-mips: check CP0 enabled for CACHE instruction also in R6 Leon Alrae
2016-02-03 16:56 ` [Qemu-devel] [PATCH 9/9] target-mips: make ITC Configuration Tags accessible to the CPU Leon Alrae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454518611-26134-1-git-send-email-leon.alrae@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).