target/hppa patch queue
Nothing complicated here. Two bugs from Laurent, two noticed by Coverity (through multiple channels).
r~
The following changes since commit 7d2c6c95511e42dffe2b263275e09957723d0ff4:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20170206-1' into staging (2017-02-06 11:44:08 +0000)
are available in the git repository at:
git://github.com/rth7680/qemu.git tags/pull-hppa-20170206
for you to fetch changes up to 6836a8fb96963a29f309d49873062bbca9ab0e28:
target/hppa: Fix gdb_write_register (2017-02-06 18:25:31 -0800)
----------------------------------------------------------------
Misc hppa fixes.
----------------------------------------------------------------
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
Richard Henderson (2):
target/hppa: Tidy do_cbranch
target/hppa: Fix gdb_write_register
linux-user/hppa/target_syscall.h | 2 +- linux-user/syscall.c | 1 - scripts/qemu-binfmt-conf.sh | 9 +++++++-- target/hppa/gdbstub.c | 1 + target/hppa/translate.c | 17 +++++------------ 5 files changed, 14 insertions(+), 16 deletions(-)
[Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
From: Laurent Vivier <[email protected]>
As we have now a linux-user HPPA target, we can add it to the list of supported targets in qemu-binfmt-conf.sh
Message-Id: <[email protected]>
--- scripts/qemu-binfmt-conf.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
scripts/qemu-binfmt-conf.sh +7 -2
@@ -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
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa
In reply to Richard HendersonFrom: Laurent Vivier <[email protected]>
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.
Message-Id: <[email protected]>
--- linux-user/syscall.c | 1 - 1 file changed, 1 deletion(-)
linux-user/syscall.c +0 -1
@@ -9343,7 +9343,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,#ifdef TARGET_NR_socketcase TARGET_NR_socket: ret =do_socket (arg1, arg2, arg3); -fd_trans_unregister (ret);break ;#endif #ifdef TARGET_NR_socketpair
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa
In reply to Richard HendersonFrom: Laurent Vivier <[email protected]>
the correct UTS machine name (as expected by systemd) is "parisc", not "hppa".
Message-Id: <[email protected]>
--- linux-user/hppa/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/hppa/target_syscall.h +1 -1
@@ -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
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch
In reply to Richard HendersonRemoves some dead code detected by Covarity.
--- target/hppa/translate.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
target/hppa/translate.c +5 -12
@@ -1433,7 +1433,6 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n,target_ulong dest =iaoq_dest (ctx, disp);TCGLabel *taken =NULL ;TCGCond c = cond->c; -int which =0 ;bool n;assert (ctx->null_cond.c ==TCG_COND_NEVER );
@@ -1455,14 +1454,14 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n, n = is_n && disp <0 ;if (n &&use_nullify_skip (ctx)) {nullify_set (ctx,0 ); -gen_goto_tb (ctx, which++, ctx->iaoq_n, ctx->iaoq_n +4 ); +gen_goto_tb (ctx,0 , ctx->iaoq_n, ctx->iaoq_n +4 ); }else {if (!n && ctx->null_lab) {gen_set_label (ctx->null_lab); ctx->null_lab =NULL ; }nullify_set (ctx, n); -gen_goto_tb (ctx, which++, ctx->iaoq_b, ctx->iaoq_n); +gen_goto_tb (ctx,0 , ctx->iaoq_b, ctx->iaoq_n); }gen_set_label (taken);
@@ -1471,23 +1470,17 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n, n = is_n && disp >=0 ;if (n &&use_nullify_skip (ctx)) {nullify_set (ctx,0 ); -gen_goto_tb (ctx, which++, dest, dest +4 ); +gen_goto_tb (ctx,1 , dest, dest +4 ); }else {nullify_set (ctx, n); -gen_goto_tb (ctx, which++, ctx->iaoq_b, dest); +gen_goto_tb (ctx,1 , ctx->iaoq_b, dest); }/* Not taken: the branch itself was nullified. */ if (ctx->null_lab) {gen_set_label (ctx->null_lab); ctx->null_lab =NULL ; -if (which <2 ) { -nullify_set (ctx,0 ); -gen_goto_tb (ctx, which, ctx->iaoq_b, ctx->iaoq_n); -return EXIT_GOTO_TB ; - }else { -return EXIT_IAQ_N_STALE ; - } +return EXIT_IAQ_N_STALE ; }else {return EXIT_GOTO_TB ; }
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register
In reply to Richard HendersonAdd a missing break, detected by Coverity.
--- target/hppa/gdbstub.c | 1 + 1 file changed, 1 insertion(+)
target/hppa/gdbstub.c +1 -0
@@ -85,6 +85,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)break ;case 35 : env->iaoq_b = val; +break ;case 59 : env->cr26 = val;break ;
Signature · 1 line
2.9.3
Your series seems to have some coding style problems. See output below for more information:
Hi,
Your series seems to have some coding style problems. See output below for more information:
Type: series
Subject: [Qemu-devel] [PULL 0/5] target/hppa patch queue
Message-id: [email protected]
=== 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
- [tag update] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
ce2db6b target/hppa: Fix gdb_write_register
dfb4b9c target/hppa: Tidy do_cbranch
b17ea53 linux-user: define correct UTS machine name for hppa 84e4ae2 linux-user: fix "apt-get update" on linux-user hppa a2cb156 linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
=== OUTPUT BEGIN ===
Checking PATCH 1/5: linux-user: add hppa magic numbers in qemu-binfmt-conf.sh...
ERROR: line over 90 characters
#36: 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
#37: 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/5: linux-user: fix "apt-get update" on linux-user hppa... Checking PATCH 3/5: linux-user: define correct UTS machine name for hppa... Checking PATCH 4/5: target/hppa: Tidy do_cbranch...
Checking PATCH 5/5: target/hppa: Fix gdb_write_register...
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Peter Maydell
AppliedQuoted 16 lines · Richard Henderson
Nothing complicated here. Two bugs from Laurent, two noticed by Coverity (through multiple channels).
r~
The following changes since commit
7d2c6c95511e42dffe2b263275e09957723d0ff4:Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20170206-1' into staging (2017-02-06 11:44:08 +0000)
are available in the git repository at:
git://github.com/rth7680/qemu.gittags/pull-hppa-20170206
Quoted 8 lines
for you to fetch changes up to
6836a8fb96963a29f309d49873062bbca9ab0e28:target/hppa: Fix
gdb_write_register(2017-02-06 18:25:31 -0800)----------------------------------------------------------------
Misc hppa fixes.----------------------------------------------------------------
Applied, thanks.
-- PMM