qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a2d866: linux-user: Support for NETLINK socke


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a2d866: linux-user: Support for NETLINK socket options
Date: Wed, 06 Nov 2019 14:04:17 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a2d866827bd88fb14bd1c973d4fec6b6d98289a6
      
https://github.com/qemu/qemu/commit/a2d866827bd88fb14bd1c973d4fec6b6d98289a6
  Author: Josh Kunz <address@hidden>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Support for NETLINK socket options

This change includes support for all AF_NETLINK socket options up to about
kernel version 5.4 (5.4 is not formally released at the time of writing).
Socket options that were introduced in kernel versions before the oldest
currently stable kernel version are guarded by kernel version macros.

This change has been built under gcc 8.3, and clang 9.0, and it passes
`make check`. The netlink options have been tested by emulating some
non-trival software that uses NETLINK socket options, but they have
not been exaustively verified.

Signed-off-by: Josh Kunz <address@hidden>
Message-Id: <address@hidden>
[lv: updated patch according to CODING_STYLE]
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 7c81570d932268a9626457a662f1c5046ebc455e
      
https://github.com/qemu/qemu/commit/7c81570d932268a9626457a662f1c5046ebc455e
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M scripts/qemu-binfmt-conf.sh

  Log Message:
  -----------
  scripts/qemu-binfmt-conf: Update for sparc64

Also note that we were missing the qemu_target_list entry
for plain sparc; fix that at the same time.

Reviewed-by: Laurent Vivier <address@hidden>
Tested-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 3d725434940696ebeb92ce6902edee868c46c1e2
      
https://github.com/qemu/qemu/commit/3d725434940696ebeb92ce6902edee868c46c1e2
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M tests/tcg/multiarch/linux-test.c

  Log Message:
  -----------
  tests/tcg/multiarch/linux-test: Fix error check for shmat

The error indicator for this syscall is -1, not 0.

Fixes: e374bfa35bfb ("shm tests - disabled clone test")
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: f8a745974de88779b000d4882b24a37153da2445
      
https://github.com/qemu/qemu/commit/f8a745974de88779b000d4882b24a37153da2445
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M target/sparc/cpu.h

  Log Message:
  -----------
  target/sparc: Define an enumeration for accessing env->regwptr

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 083244d320c3d8d7b93a08b2b0f5d06c6295be66
      
https://github.com/qemu/qemu/commit/083244d320c3d8d7b93a08b2b0f5d06c6295be66
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/target_cpu.h

  Log Message:
  -----------
  linux-user/sparc: Use WREG constants in sparc/target_cpu.h

This fixes a naming bug wherein we used "UREG_FP" to access the
stack pointer.  OTOH, the "UREG_FP" constant was also defined
incorrectly such that it *did* reference the stack pointer.

Note that the kernel legitimately uses the name "FP", because it
utilizes the rolled stack window in processing the system call.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 80180eb2ca586aae1e8ac8e3b50ff3780dcd8839
      
https://github.com/qemu/qemu/commit/80180eb2ca586aae1e8ac8e3b50ff3780dcd8839
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/signal.c

  Log Message:
  -----------
  linux-user/sparc: Begin using WREG constants in sparc/signal.c

This is non-obvious because the UREG constants are in fact wrong.

s/UREG_I/WREG_O/g
s/UREG_O/WREG_I/g
s/UREG_L/WREG_L/g

These substitutions have identical integer values.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 8d9c72a2e2f21fb61e615478ea802799e3ef98f0
      
https://github.com/qemu/qemu/commit/8d9c72a2e2f21fb61e615478ea802799e3ef98f0
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/signal.c

  Log Message:
  -----------
  linux-user/sparc: Use WREG_SP constant in sparc/signal.c

s/UREG_FP/WREG_SP/g

This is non-obvious because the UREG_FP constant is fact wrong.
However, the previous search-and-replace patch made it clear that
UREG_FP expands to WREG_O6, and we can see from the enumeration in
target/sparc/cpu.h that WREG_O6 is in fact WREG_SP, the stack pointer.

The UREG_SP define is unused; remove it.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 9c226a1107750c480b930322940485fb1e4e09b9
      
https://github.com/qemu/qemu/commit/9c226a1107750c480b930322940485fb1e4e09b9
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/signal.c

  Log Message:
  -----------
  linux-user/sparc: Fix WREG usage in setup_frame

Use WREG_I0 not WREG_O0 in order to properly save the "ins".
The "outs" were saved separately in setup___siginfo.

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: b220cbcf25d2a78f645ee105ad07558de699c4fa
      
https://github.com/qemu/qemu/commit/b220cbcf25d2a78f645ee105ad07558de699c4fa
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/signal.c

  Log Message:
  -----------
  linux-user/sparc64: Fix target_signal_frame

Instructions are always 4 bytes; use uint32_t not abi_ulong.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 608999d17c8726eb4cfa967e95f06cf026a4dde2
      
https://github.com/qemu/qemu/commit/608999d17c8726eb4cfa967e95f06cf026a4dde2
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/aarch64/target_cpu.h
    M linux-user/alpha/target_cpu.h
    M linux-user/arm/target_cpu.h
    M linux-user/cris/target_cpu.h
    M linux-user/hppa/target_cpu.h
    M linux-user/i386/target_cpu.h
    M linux-user/m68k/target_cpu.h
    M linux-user/microblaze/target_cpu.h
    M linux-user/mips/target_cpu.h
    M linux-user/nios2/target_cpu.h
    M linux-user/openrisc/target_cpu.h
    M linux-user/ppc/target_cpu.h
    M linux-user/riscv/target_cpu.h
    M linux-user/s390x/target_cpu.h
    M linux-user/sh4/target_cpu.h
    M linux-user/sparc/target_cpu.h
    M linux-user/syscall.c
    M linux-user/tilegx/target_cpu.h
    M linux-user/xtensa/target_cpu.h

  Log Message:
  -----------
  linux-user: Rename cpu_clone_regs to cpu_clone_regs_child

We will need a target-specific hook for adjusting registers
in the parent during clone.  To avoid confusion, rename the
one we have to make it clear it affects the child.

At the same time, pass in the flags from the clone syscall.
We will need them for correct behaviour for Sparc.

Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 07a6ecf48feaddb4914ca8ec9603021f992ec3b9
      
https://github.com/qemu/qemu/commit/07a6ecf48feaddb4914ca8ec9603021f992ec3b9
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/aarch64/target_cpu.h
    M linux-user/alpha/target_cpu.h
    M linux-user/arm/target_cpu.h
    M linux-user/cris/target_cpu.h
    M linux-user/hppa/target_cpu.h
    M linux-user/i386/target_cpu.h
    M linux-user/m68k/target_cpu.h
    M linux-user/microblaze/target_cpu.h
    M linux-user/mips/target_cpu.h
    M linux-user/nios2/target_cpu.h
    M linux-user/openrisc/target_cpu.h
    M linux-user/ppc/target_cpu.h
    M linux-user/riscv/target_cpu.h
    M linux-user/s390x/target_cpu.h
    M linux-user/sh4/target_cpu.h
    M linux-user/sparc/target_cpu.h
    M linux-user/syscall.c
    M linux-user/tilegx/target_cpu.h
    M linux-user/xtensa/target_cpu.h

  Log Message:
  -----------
  linux-user: Introduce cpu_clone_regs_parent

We will need a target-specific hook for adjusting registers
in the parent during clone.  Add an empty inline function for
each target, and invoke it from the proper places.

Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 2ad983e0f4ea58a176ea51d61226758eff40c697
      
https://github.com/qemu/qemu/commit/2ad983e0f4ea58a176ea51d61226758eff40c697
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/sparc/target_cpu.h

  Log Message:
  -----------
  linux-user/sparc: Fix cpu_clone_regs_*

We failed to set the secondary return value in %o1
we failed to advance the PC past the syscall,
we failed to adjust regwptr into the new structure,
we stored the stack pointer into the wrong register.

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 5849dfe410b3fefec7d54a536cda7ccbf809ebea
      
https://github.com/qemu/qemu/commit/5849dfe410b3fefec7d54a536cda7ccbf809ebea
  Author: Richard Henderson <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/alpha/target_cpu.h

  Log Message:
  -----------
  linux-user/alpha: Set r20 secondary return value

This value is not, as far as I know, used by any linux software,
but it is set by the kernel and is part of the ABI.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 374b63590ec7ddfe5b3130ede79d14ca09b76d67
      
https://github.com/qemu/qemu/commit/374b63590ec7ddfe5b3130ede79d14ca09b76d67
  Author: Peter Maydell <address@hidden>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M linux-user/aarch64/target_cpu.h
    M linux-user/alpha/target_cpu.h
    M linux-user/arm/target_cpu.h
    M linux-user/cris/target_cpu.h
    M linux-user/hppa/target_cpu.h
    M linux-user/i386/target_cpu.h
    M linux-user/m68k/target_cpu.h
    M linux-user/microblaze/target_cpu.h
    M linux-user/mips/target_cpu.h
    M linux-user/nios2/target_cpu.h
    M linux-user/openrisc/target_cpu.h
    M linux-user/ppc/target_cpu.h
    M linux-user/riscv/target_cpu.h
    M linux-user/s390x/target_cpu.h
    M linux-user/sh4/target_cpu.h
    M linux-user/sparc/signal.c
    M linux-user/sparc/target_cpu.h
    M linux-user/syscall.c
    M linux-user/tilegx/target_cpu.h
    M linux-user/xtensa/target_cpu.h
    M scripts/qemu-binfmt-conf.sh
    M target/sparc/cpu.h
    M tests/tcg/multiarch/linux-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging

sparc/sparc64 fixes: this doesn't fix debian chroot for me
but they are a step in the good direction.
Fix Netlink support.
Trivial fix for alpha

PULL v2: fix checkpatch warnings

# gpg: Signature made Wed 06 Nov 2019 13:04:36 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <address@hidden>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-4.2-pull-request:
  linux-user/alpha: Set r20 secondary return value
  linux-user/sparc: Fix cpu_clone_regs_*
  linux-user: Introduce cpu_clone_regs_parent
  linux-user: Rename cpu_clone_regs to cpu_clone_regs_child
  linux-user/sparc64: Fix target_signal_frame
  linux-user/sparc: Fix WREG usage in setup_frame
  linux-user/sparc: Use WREG_SP constant in sparc/signal.c
  linux-user/sparc: Begin using WREG constants in sparc/signal.c
  linux-user/sparc: Use WREG constants in sparc/target_cpu.h
  target/sparc: Define an enumeration for accessing env->regwptr
  tests/tcg/multiarch/linux-test: Fix error check for shmat
  scripts/qemu-binfmt-conf: Update for sparc64
  linux-user: Support for NETLINK socket options

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/80d1c10b2243...374b63590ec7



reply via email to

[Prev in Thread] Current Thread [Next in Thread]