All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3
@ 2018-04-10 16:01 Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 1/3] linux-user: fix microblaze get_sp_from_cpustate() Laurent Vivier
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-04-10 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Riku Voipio

The following changes since commit df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8:

  Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' into staging (2018-04-10 14:04:27 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/linux-user-for-2.12-pull-request

for you to fetch changes up to 46a1ee4f397ffd305da95fb65dc73be49667ff6d:

  linux-user: implement HWCAP bits on MIPS (2018-04-10 18:00:14 +0200)

----------------------------------------------------------------
Trivial fixes for microblaze
v2: add HWCAP bits on MIPS
----------------------------------------------------------------

James Cowgill (1):
  linux-user: implement HWCAP bits on MIPS

Laurent Vivier (2):
  linux-user: fix microblaze get_sp_from_cpustate()
  linux-user: add microblaze/microblazeel magic numbers in
    qemu-binfmt-conf.sh

 linux-user/elfload.c                  | 24 ++++++++++++++++++++++++
 linux-user/microblaze/target_signal.h |  2 +-
 scripts/qemu-binfmt-conf.sh           | 12 ++++++++++--
 3 files changed, 35 insertions(+), 3 deletions(-)

-- 
2.14.3

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

* [Qemu-devel] [PULL v2 1/3] linux-user: fix microblaze get_sp_from_cpustate()
  2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
@ 2018-04-10 16:01 ` Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 2/3] linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh Laurent Vivier
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-04-10 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Riku Voipio

get_sigframe() uses regs[1] and this is actual SP.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180409115212.875-1-laurent@vivier.eu>
---
 linux-user/microblaze/target_signal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/microblaze/target_signal.h b/linux-user/microblaze/target_signal.h
index de2b0f49d5..642865f12e 100644
--- a/linux-user/microblaze/target_signal.h
+++ b/linux-user/microblaze/target_signal.h
@@ -23,7 +23,7 @@ typedef struct target_sigaltstack {
 
 static inline abi_ulong get_sp_from_cpustate(CPUMBState *state)
 {
-    return state->regs[14];
+    return state->regs[1];
 }
 
 
-- 
2.14.3

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

* [Qemu-devel] [PULL v2 2/3] linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh
  2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 1/3] linux-user: fix microblaze get_sp_from_cpustate() Laurent Vivier
@ 2018-04-10 16:01 ` Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 3/3] linux-user: implement HWCAP bits on MIPS Laurent Vivier
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-04-10 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Riku Voipio

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180409115212.875-2-laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index f39ad344fc..7ab7435fbd 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -1,10 +1,10 @@
 #!/bin/sh
-# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390/HPPA/Xtensa
+# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390/HPPA/Xtensa/microblaze
 # program execution by the kernel
 
 qemu_target_list="i386 i486 alpha arm armeb sparc32plus ppc ppc64 ppc64le m68k \
 mips mipsel mipsn32 mipsn32el mips64 mips64el \
-sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb"
+sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb microblaze microblazeel"
 
 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'
@@ -116,6 +116,14 @@ xtensaeb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\
 xtensaeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
 xtensaeb_family=xtensaeb
 
+microblaze_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xba\xab'
+microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
+microblaze_family=microblaze
+
+microblazeel_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xab\xba'
+microblazeel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
+microblazeel_family=microblazeel
+
 qemu_get_family() {
     cpu=${HOST_ARCH:-$(uname -m)}
     case "$cpu" in
-- 
2.14.3

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

* [Qemu-devel] [PULL v2 3/3] linux-user: implement HWCAP bits on MIPS
  2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 1/3] linux-user: fix microblaze get_sp_from_cpustate() Laurent Vivier
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 2/3] linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh Laurent Vivier
@ 2018-04-10 16:01 ` Laurent Vivier
  2018-04-10 16:16 ` [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 no-reply
  2018-04-11 13:23 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-04-10 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Riku Voipio, James Cowgill

From: James Cowgill <james.cowgill@mips.com>

Add support for the two currently defined HWCAP bits on MIPS - R6 and
MSA.

Buglink: https://bugs.launchpad.net/qemu/+bug/1754372
Signed-off-by: James Cowgill <james.cowgill@mips.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180315151348.6451-1-james.cowgill@mips.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/elfload.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 23e34957f9..c77ed1bb01 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -882,6 +882,30 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUMIPSState *e
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE        4096
 
+/* See arch/mips/include/uapi/asm/hwcap.h.  */
+enum {
+    HWCAP_MIPS_R6           = (1 << 0),
+    HWCAP_MIPS_MSA          = (1 << 1),
+};
+
+#define ELF_HWCAP get_elf_hwcap()
+
+static uint32_t get_elf_hwcap(void)
+{
+    MIPSCPU *cpu = MIPS_CPU(thread_cpu);
+    uint32_t hwcaps = 0;
+
+#define GET_FEATURE(flag, hwcap) \
+    do { if (cpu->env.insn_flags & (flag)) { hwcaps |= hwcap; } } while (0)
+
+    GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6);
+    GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA);
+
+#undef GET_FEATURE
+
+    return hwcaps;
+}
+
 #endif /* TARGET_MIPS */
 
 #ifdef TARGET_MICROBLAZE
-- 
2.14.3

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

* Re: [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3
  2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
                   ` (2 preceding siblings ...)
  2018-04-10 16:01 ` [Qemu-devel] [PULL v2 3/3] linux-user: implement HWCAP bits on MIPS Laurent Vivier
@ 2018-04-10 16:16 ` no-reply
  2018-04-11 13:23 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: no-reply @ 2018-04-10 16:16 UTC (permalink / raw)
  To: laurent; +Cc: famz, qemu-devel, riku.voipio

Hi,

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

Type: series
Message-id: 20180410160142.21096-1-laurent@vivier.eu
Subject: [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3

=== 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
git config --local diff.algorithm histogram

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/20180410160142.21096-1-laurent@vivier.eu -> patchew/20180410160142.21096-1-laurent@vivier.eu
Switched to a new branch 'test'
3d63c01ac9 linux-user: implement HWCAP bits on MIPS
53058bad56 linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh
871304edc3 linux-user: fix microblaze get_sp_from_cpustate()

=== OUTPUT BEGIN ===
Checking PATCH 1/3: linux-user: fix microblaze get_sp_from_cpustate()...
Checking PATCH 2/3: linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh...
ERROR: line over 90 characters
#24: FILE: scripts/qemu-binfmt-conf.sh:7:
+sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb microblaze microblazeel"

WARNING: line over 80 characters
#32: FILE: scripts/qemu-binfmt-conf.sh:119:
+microblaze_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xba\xab'

ERROR: line over 90 characters
#33: FILE: scripts/qemu-binfmt-conf.sh:120:
+microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'

ERROR: line over 90 characters
#36: FILE: scripts/qemu-binfmt-conf.sh:123:
+microblazeel_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xab\xba'

ERROR: line over 90 characters
#37: FILE: scripts/qemu-binfmt-conf.sh:124:
+microblazeel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'

total: 4 errors, 1 warnings, 26 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 3/3: linux-user: implement HWCAP bits on MIPS...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3
  2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
                   ` (3 preceding siblings ...)
  2018-04-10 16:16 ` [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 no-reply
@ 2018-04-11 13:23 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2018-04-11 13:23 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: QEMU Developers, Riku Voipio

On 10 April 2018 at 17:01, Laurent Vivier <laurent@vivier.eu> wrote:
> The following changes since commit df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' into staging (2018-04-10 14:04:27 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/linux-user-for-2.12-pull-request
>
> for you to fetch changes up to 46a1ee4f397ffd305da95fb65dc73be49667ff6d:
>
>   linux-user: implement HWCAP bits on MIPS (2018-04-10 18:00:14 +0200)
>
> ----------------------------------------------------------------
> Trivial fixes for microblaze
> v2: add HWCAP bits on MIPS
> ----------------------------------------------------------------
>
> James Cowgill (1):
>   linux-user: implement HWCAP bits on MIPS
>
> Laurent Vivier (2):
>   linux-user: fix microblaze get_sp_from_cpustate()
>   linux-user: add microblaze/microblazeel magic numbers in
>     qemu-binfmt-conf.sh
>
>  linux-user/elfload.c                  | 24 ++++++++++++++++++++++++
>  linux-user/microblaze/target_signal.h |  2 +-
>  scripts/qemu-binfmt-conf.sh           | 12 ++++++++++--
>  3 files changed, 35 insertions(+), 3 deletions(-)

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2018-04-11 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 16:01 [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 Laurent Vivier
2018-04-10 16:01 ` [Qemu-devel] [PULL v2 1/3] linux-user: fix microblaze get_sp_from_cpustate() Laurent Vivier
2018-04-10 16:01 ` [Qemu-devel] [PULL v2 2/3] linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh Laurent Vivier
2018-04-10 16:01 ` [Qemu-devel] [PULL v2 3/3] linux-user: implement HWCAP bits on MIPS Laurent Vivier
2018-04-10 16:16 ` [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3 no-reply
2018-04-11 13:23 ` 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.