* [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa
@ 2017-01-26 8:04 Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 1/3] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Laurent Vivier @ 2017-01-26 8:04 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Riku Voipio, John Paul Adrian Glaubitz,
Richard Henderson, Laurent Vivier
This short series enables hppa in qemu-binfmt-conf.sh, and fixes
a bug in the netlink functions that has been found by Adrian Glaubitz
while he was testing a debian chroot with qemu-hppa. I think the problem
doesn't appear on other architectures I have tested as they should use
NR_socketcall syscall instead of NR_socket syscall.
v3:
fix UNAME_MACHINE instead of cpu_to_uname_machine()
v2:
added the hppa UTS machine name fix
added R-b and T-b
Laurent Vivier (3):
linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
linux-user: fix "apt-get update" on linux-user hppa
linux-user: define correct UTS machine name for hppa
linux-user/hppa/target_syscall.h | 2 +-
linux-user/syscall.c | 1 -
scripts/qemu-binfmt-conf.sh | 9 +++++++--
3 files changed, 8 insertions(+), 4 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v3 1/3] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
2017-01-26 8:04 [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa Laurent Vivier
@ 2017-01-26 8:04 ` Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 2/3] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2017-01-26 8:04 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Riku Voipio, John Paul Adrian Glaubitz,
Richard Henderson, Laurent Vivier
As we have now a linux-user HPPA target, we can add it to the list of
supported targets in qemu-binfmt-conf.sh
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
---
scripts/qemu-binfmt-conf.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index de4d1c1..0f1aa63 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -1,9 +1,10 @@
#!/bin/sh
-# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
+# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390/HPPA
+# program execution by the kernel
qemu_target_list="i386 i486 alpha arm sparc32plus ppc ppc64 ppc64le m68k \
mips mipsel mipsn32 mipsn32el mips64 mips64el \
-sh4 sh4eb s390x aarch64"
+sh4 sh4eb s390x aarch64 hppa"
i386_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00'
i386_mask='\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
@@ -91,6 +92,10 @@ aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x
aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
aarch64_family=arm
+hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'
+hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
+hppa_family=hppa
+
qemu_get_family() {
cpu=${HOST_ARCH:-$(uname -m)}
case "$cpu" in
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v3 2/3] linux-user: fix "apt-get update" on linux-user hppa
2017-01-26 8:04 [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 1/3] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
@ 2017-01-26 8:04 ` Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 3/3] linux-user: define correct UTS machine name for hppa Laurent Vivier
2017-01-26 8:14 ` [Qemu-devel] [PATCH v3 0/3] linux-user: some patches " no-reply
3 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2017-01-26 8:04 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Riku Voipio, John Paul Adrian Glaubitz,
Richard Henderson, Laurent Vivier
apt-get was hanging on linux-user hppa.
strace has shown the netlink data stream was not correctly byte swapped.
It appears the fd translator function is unregistered just after it
has been registered, so the translator function is not called.
This patch removes the fd_trans_unregister() after the do_socket()
in the TARGET_NR_socket case.
This fd_trans_unregister() was added by commit
e36800c linux-user: add signalfd/signalfd4 syscalls
when do_socket() was not registering any fd translator.
And as now it is, we must remove this fd_trans_unregister() to keep them.
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
linux-user/syscall.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 11a311f..9be8e95 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9343,7 +9343,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#ifdef TARGET_NR_socket
case TARGET_NR_socket:
ret = do_socket(arg1, arg2, arg3);
- fd_trans_unregister(ret);
break;
#endif
#ifdef TARGET_NR_socketpair
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH v3 3/3] linux-user: define correct UTS machine name for hppa
2017-01-26 8:04 [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 1/3] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 2/3] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
@ 2017-01-26 8:04 ` Laurent Vivier
2017-01-26 8:14 ` [Qemu-devel] [PATCH v3 0/3] linux-user: some patches " no-reply
3 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2017-01-26 8:04 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Riku Voipio, John Paul Adrian Glaubitz,
Richard Henderson, Laurent Vivier
the correct UTS machine name (as expected by systemd) is "parisc",
not "hppa".
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/hppa/target_syscall.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h
index ac18a9c..e2f3668 100644
--- a/linux-user/hppa/target_syscall.h
+++ b/linux-user/hppa/target_syscall.h
@@ -19,7 +19,7 @@ struct target_pt_regs {
target_ulong ipsw;
};
-#define UNAME_MACHINE "hppa"
+#define UNAME_MACHINE "parisc"
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa
2017-01-26 8:04 [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa Laurent Vivier
` (2 preceding siblings ...)
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 3/3] linux-user: define correct UTS machine name for hppa Laurent Vivier
@ 2017-01-26 8:14 ` no-reply
3 siblings, 0 replies; 5+ messages in thread
From: no-reply @ 2017-01-26 8:14 UTC (permalink / raw)
To: laurent; +Cc: famz, qemu-devel, peter.maydell, rth, riku.voipio, glaubitz
Hi,
Your series seems to have some coding style problems. See output below for
more information:
Type: series
Subject: [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa
Message-id: 20170126080449.28255-1-laurent@vivier.eu
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
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
* [new tag] patchew/20170126080449.28255-1-laurent@vivier.eu -> patchew/20170126080449.28255-1-laurent@vivier.eu
Switched to a new branch 'test'
c3c9013 linux-user: define correct UTS machine name for hppa
7b0be21 linux-user: fix "apt-get update" on linux-user hppa
ab50177 linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
=== OUTPUT BEGIN ===
Checking PATCH 1/3: linux-user: add hppa magic numbers in qemu-binfmt-conf.sh...
ERROR: line over 90 characters
#34: FILE: scripts/qemu-binfmt-conf.sh:95:
+hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'
ERROR: line over 90 characters
#35: FILE: scripts/qemu-binfmt-conf.sh:96:
+hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
total: 2 errors, 0 warnings, 22 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 2/3: linux-user: fix "apt-get update" on linux-user hppa...
Checking PATCH 3/3: linux-user: define correct UTS machine name for hppa...
=== 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-26 8:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-26 8:04 [Qemu-devel] [PATCH v3 0/3] linux-user: some patches for hppa Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 1/3] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 2/3] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
2017-01-26 8:04 ` [Qemu-devel] [PATCH v3 3/3] linux-user: define correct UTS machine name for hppa Laurent Vivier
2017-01-26 8:14 ` [Qemu-devel] [PATCH v3 0/3] linux-user: some patches " no-reply
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).