[Qemu-devel] [PATCH v3 0/7] Add aarch64_be-linux-user target

Michael Weiser posted 7 patches 6 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171220212308.12614-1-michael.weiser@gmx.de
Test checkpatch failed
Test docker passed
Test ppc passed
Test s390x passed
configure                                 |  5 +++--
default-configs/aarch64_be-linux-user.mak |  1 +
linux-user/aarch64/target_syscall.h       |  4 ++++
linux-user/main.c                         |  6 ++++++
linux-user/signal.c                       | 10 +++++++---
scripts/qemu-binfmt-conf.sh               | 15 +++++++++++----
6 files changed, 32 insertions(+), 9 deletions(-)
create mode 100644 default-configs/aarch64_be-linux-user.mak
[Qemu-devel] [PATCH v3 0/7] Add aarch64_be-linux-user target
Posted by Michael Weiser 6 years, 4 months ago
Hello,

below patches add support for big-endian aarch64 to linux-user. Almost
everything is already in place. The patches just set up the CPU flags as
required for big-endianness, add a distinction in uname and make sure the
instructions for the signal trampoline end up in memory little-endian.
Finally, configure is extended to allow building of a
aarch64_be-linux-user target and scripts/qemu-binfmt-conf.sh to include
the binfmt magic for aarch64_be ELF files.

While at it, scripts/qemu-binfmt-conf.sh is changed again to separate
arm/aarch64 targets of differing endianness into separate families so
that the binfmt handler for the respective other endianness is indeed
registered.  Also, while not strictly relevant to aarch64 support, armeb
is actually added to the list of targets, binfmt handlers should
registered for.

With this I am able to run individual aarch64_be binaries as well as
chroot into a full-blown aarch64_be userland using binfmt_misc, running
and compiling things (Gentoo crossdev/native).

v3:
- drop changes to aarch64 host support from configure
- add binfmt arm CPU family separation
- add armeb to binfmt handler targets

v2:
- add binfmt magic to qemu-binfmt-conf.sh
- fix style problems (tab indenting)

Thanks,
Michael


Michael Weiser (7):
  linux-user: Add support for big-endian aarch64
  linux-user: Add separate aarch64_be uname
  linux-user: Fix endianess of aarch64 signal trampoline
  configure: Add aarch64_be-linux-user target
  linux-user: Add aarch64_be magic numbers to qemu-binfmt-conf.sh
  linux-user: Separate binfmt arm CPU families
  linux-user: Activate armeb handler registration

 configure                                 |  5 +++--
 default-configs/aarch64_be-linux-user.mak |  1 +
 linux-user/aarch64/target_syscall.h       |  4 ++++
 linux-user/main.c                         |  6 ++++++
 linux-user/signal.c                       | 10 +++++++---
 scripts/qemu-binfmt-conf.sh               | 15 +++++++++++----
 6 files changed, 32 insertions(+), 9 deletions(-)
 create mode 100644 default-configs/aarch64_be-linux-user.mak

-- 
2.15.1


Re: [Qemu-devel] [PATCH v3 0/7] Add aarch64_be-linux-user target
Posted by no-reply@patchew.org 6 years, 4 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20171220212308.12614-1-michael.weiser@gmx.de
Subject: [Qemu-devel] [PATCH v3 0/7]  Add aarch64_be-linux-user target

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/1513617273-7988-1-git-send-email-thuth@redhat.com -> patchew/1513617273-7988-1-git-send-email-thuth@redhat.com
Switched to a new branch 'test'
66f0907f64 linux-user: Activate armeb handler registration
da88dc8d67 linux-user: Separate binfmt arm CPU families
14ba0c4689 linux-user: Add aarch64_be magic numbers to qemu-binfmt-conf.sh
bfcb2786c6 configure: Add aarch64_be-linux-user target
69bf6c6262 linux-user: Fix endianess of aarch64 signal trampoline
17d95be0b5 linux-user: Add separate aarch64_be uname
7e24032d98 linux-user: Add support for big-endian aarch64

=== OUTPUT BEGIN ===
Checking PATCH 1/7: linux-user: Add support for big-endian aarch64...
Checking PATCH 2/7: linux-user: Add separate aarch64_be uname...
Checking PATCH 3/7: linux-user: Fix endianess of aarch64 signal trampoline...
Checking PATCH 4/7: configure: Add aarch64_be-linux-user target...
Checking PATCH 5/7: linux-user: Add aarch64_be magic numbers to qemu-binfmt-conf.sh...
WARNING: line over 80 characters
#30: FILE: scripts/qemu-binfmt-conf.sh:95:
+aarch64_be_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7'

ERROR: line over 90 characters
#31: FILE: scripts/qemu-binfmt-conf.sh:96:
+aarch64_be_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'

total: 1 errors, 1 warnings, 18 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 6/7: linux-user: Separate binfmt arm CPU families...
Checking PATCH 7/7: linux-user: Activate armeb handler registration...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH v3 0/7] Add aarch64_be-linux-user target
Posted by Peter Maydell 6 years, 3 months ago
On 20 December 2017 at 21:23, Michael Weiser <michael.weiser@gmx.de> wrote:
> Hello,
>
> below patches add support for big-endian aarch64 to linux-user. Almost
> everything is already in place. The patches just set up the CPU flags as
> required for big-endianness, add a distinction in uname and make sure the
> instructions for the signal trampoline end up in memory little-endian.
> Finally, configure is extended to allow building of a
> aarch64_be-linux-user target and scripts/qemu-binfmt-conf.sh to include
> the binfmt magic for aarch64_be ELF files.
>
> While at it, scripts/qemu-binfmt-conf.sh is changed again to separate
> arm/aarch64 targets of differing endianness into separate families so
> that the binfmt handler for the respective other endianness is indeed
> registered.  Also, while not strictly relevant to aarch64 support, armeb
> is actually added to the list of targets, binfmt handlers should
> registered for.
>
> With this I am able to run individual aarch64_be binaries as well as
> chroot into a full-blown aarch64_be userland using binfmt_misc, running
> and compiling things (Gentoo crossdev/native).
>
> v3:
> - drop changes to aarch64 host support from configure
> - add binfmt arm CPU family separation
> - add armeb to binfmt handler targets
>
> v2:
> - add binfmt magic to qemu-binfmt-conf.sh
> - fix style problems (tab indenting)

Thanks for this patchset -- I have applied it to target-arm.next.

-- PMM