All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/5] target/hppa patch queue
@ 2017-02-07  2:32 Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Richard Henderson
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

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(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
@ 2017-02-07  2:32 ` Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa Richard Henderson
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Laurent Vivier

From: Laurent Vivier <laurent@vivier.eu>

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>
Message-Id: <20170126080449.28255-2-laurent@vivier.eu>
Signed-off-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] 8+ messages in thread

* [Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Richard Henderson
@ 2017-02-07  2:32 ` Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa Richard Henderson
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Laurent Vivier

From: Laurent Vivier <laurent@vivier.eu>

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>
Message-Id: <20170126080449.28255-3-laurent@vivier.eu>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 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] 8+ messages in thread

* [Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa Richard Henderson
@ 2017-02-07  2:32 ` Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch Richard Henderson
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Laurent Vivier

From: Laurent Vivier <laurent@vivier.eu>

the correct UTS machine name (as expected by systemd) is "parisc",
not "hppa".

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20170126080449.28255-4-laurent@vivier.eu>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 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] 8+ messages in thread

* [Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
                   ` (2 preceding siblings ...)
  2017-02-07  2:32 ` [Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa Richard Henderson
@ 2017-02-07  2:32 ` Richard Henderson
  2017-02-07  2:32 ` [Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register Richard Henderson
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

Removes some dead code detected by Covarity.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target/hppa/translate.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 4d243f7..5d571f0 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -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;
     }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
                   ` (3 preceding siblings ...)
  2017-02-07  2:32 ` [Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch Richard Henderson
@ 2017-02-07  2:32 ` Richard Henderson
  2017-02-07  2:42 ` [Qemu-devel] [PULL 0/5] target/hppa patch queue no-reply
  2017-02-07 15:29 ` Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2017-02-07  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

Add a missing break, detected by Coverity.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target/hppa/gdbstub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c
index 413a5e1..c37a56f 100644
--- a/target/hppa/gdbstub.c
+++ b/target/hppa/gdbstub.c
@@ -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;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PULL 0/5] target/hppa patch queue
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
                   ` (4 preceding siblings ...)
  2017-02-07  2:32 ` [Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register Richard Henderson
@ 2017-02-07  2:42 ` no-reply
  2017-02-07 15:29 ` Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: no-reply @ 2017-02-07  2:42 UTC (permalink / raw)
  To: rth; +Cc: famz, qemu-devel, peter.maydell

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: 20170207023229.29431-1-rth@twiddle.net

=== 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/1486110164-13797-1-git-send-email-peterx@redhat.com -> patchew/1486110164-13797-1-git-send-email-peterx@redhat.com
 * [new tag]         patchew/20170207023229.29431-1-rth@twiddle.net -> patchew/20170207023229.29431-1-rth@twiddle.net
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 patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PULL 0/5] target/hppa patch queue
  2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
                   ` (5 preceding siblings ...)
  2017-02-07  2:42 ` [Qemu-devel] [PULL 0/5] target/hppa patch queue no-reply
@ 2017-02-07 15:29 ` Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2017-02-07 15:29 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On 7 February 2017 at 02:32, Richard Henderson <rth@twiddle.net> wrote:
> 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.
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-02-07 15:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
2017-02-07  2:32 ` [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Richard Henderson
2017-02-07  2:32 ` [Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa Richard Henderson
2017-02-07  2:32 ` [Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa Richard Henderson
2017-02-07  2:32 ` [Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch Richard Henderson
2017-02-07  2:32 ` [Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register Richard Henderson
2017-02-07  2:42 ` [Qemu-devel] [PULL 0/5] target/hppa patch queue no-reply
2017-02-07 15:29 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.