[Qemu-devel] [PATCH 00/11] target/sh4 improvments

Richard Henderson posted 11 patches 8 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170706002401.10507-1-rth@twiddle.net
Test FreeBSD passed
Test checkpatch failed
Test docker passed
Test s390x passed
target/sh4/cpu.h       |  24 +-
target/sh4/helper.h    |   1 +
linux-user/signal.c    |  21 ++
target/sh4/op_helper.c |   6 +
target/sh4/translate.c | 724 ++++++++++++++++++++++++++++++++++++++-----------
5 files changed, 621 insertions(+), 155 deletions(-)
[Qemu-devel] [PATCH 00/11] target/sh4 improvments
Posted by Richard Henderson 8 years, 4 months ago
This fixes two problems with atomic operations on sh4,
including an attempt at supporting the user-space atomics
technique used by most sh-linux-user binaries.

This is good enough to run the one occurrence in linux-user-test-0.3.
I'm still downloading enough of a cross environment to be able to run
more recent sh4 binaries.  Including the one in the LP bug report.

Thoughts and more extensive testing appreciated.


r~


Richard Henderson (11):
  target/sh4: Use cmpxchg for movco
  target/sh4: Consolidate end-of-TB tests
  target/sh4: Handle user-space atomics
  target/sh4: Recognize common gUSA sequences
  linux-user/sh4: Notice gUSA regions during signal delivery
  target/sh4: Hoist register bank selection
  target/sh4: Unify cpu_fregs into FREG
  target/sh4: Pass DisasContext to fpr64 routines
  target/sh4: Avoid a potential translator crash for malformed FPR64
  target/sh4: Hoist fp bank selection
  target/sh4: Eliminate DREG macro

 target/sh4/cpu.h       |  24 +-
 target/sh4/helper.h    |   1 +
 linux-user/signal.c    |  21 ++
 target/sh4/op_helper.c |   6 +
 target/sh4/translate.c | 724 ++++++++++++++++++++++++++++++++++++++-----------
 5 files changed, 621 insertions(+), 155 deletions(-)

-- 
2.9.4


Re: [Qemu-devel] [PATCH 00/11] target/sh4 improvments
Posted by Laurent Vivier 8 years, 4 months ago
Le 06/07/2017 à 02:23, Richard Henderson a écrit :
> This fixes two problems with atomic operations on sh4,
> including an attempt at supporting the user-space atomics
> technique used by most sh-linux-user binaries.

I tried some time ago to support gUSA hack by decoding the
instruction[1] the application wants to be atomic, but it is not viable
as we need to know all possible sequences the user can generate (but we
can guess it is always generated by glibc, and thus well known).

Laurent

[1]
https://github.com/vivier/qemu/commit/25013c121661c6831f08c2140114c8de06cf48da

Re: [Qemu-devel] [PATCH 00/11] target/sh4 improvments
Posted by Aurelien Jarno 8 years, 4 months ago
On 2017-07-05 14:23, Richard Henderson wrote:
> This fixes two problems with atomic operations on sh4,
> including an attempt at supporting the user-space atomics
> technique used by most sh-linux-user binaries.
> 
> This is good enough to run the one occurrence in linux-user-test-0.3.
> I'm still downloading enough of a cross environment to be able to run
> more recent sh4 binaries.  Including the one in the LP bug report.
> 
> Thoughts and more extensive testing appreciated.

Thanks for you work. For the next version, could you please base it on
this patchset:

http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg00095.html

I'll try to review it over the next days, but unfortunately I'll have
little time before Monday.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net