Commit 374b6359 authored by Peter Maydell's avatar Peter Maydell
Browse files

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 "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [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: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 80d1c10b 5849dfe4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
#ifndef AARCH64_TARGET_CPU_H
#define AARCH64_TARGET_CPU_H

static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUARMState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->xregs[31] = newsp;
@@ -27,6 +28,10 @@ static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
    env->xregs[0] = 0;
}

static inline void cpu_clone_regs_parent(CPUARMState *env, unsigned flags)
{
}

static inline void cpu_set_tls(CPUARMState *env, target_ulong newtls)
{
    /* Note that AArch64 Linux keeps the TLS pointer in TPIDR; this is
+15 −1
Original line number Diff line number Diff line
@@ -19,13 +19,27 @@
#ifndef ALPHA_TARGET_CPU_H
#define ALPHA_TARGET_CPU_H

static inline void cpu_clone_regs(CPUAlphaState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUAlphaState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->ir[IR_SP] = newsp;
    }
    env->ir[IR_V0] = 0;
    env->ir[IR_A3] = 0;
    env->ir[IR_A4] = 1;  /* OSF/1 secondary return: child */
}

static inline void cpu_clone_regs_parent(CPUAlphaState *env, unsigned flags)
{
    /*
     * OSF/1 secondary return: parent
     * Note that the kernel does not do this if SETTLS, because the
     * settls argument register is still live after copy_thread.
     */
    if (!(flags & CLONE_SETTLS)) {
        env->ir[IR_A4] = 0;
    }
}

static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls)
+6 −1
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@ static inline unsigned long arm_max_reserved_va(CPUState *cs)
}
#define MAX_RESERVED_VA  arm_max_reserved_va

static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUARMState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->regs[13] = newsp;
@@ -49,6 +50,10 @@ static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
    env->regs[0] = 0;
}

static inline void cpu_clone_regs_parent(CPUARMState *env, unsigned flags)
{
}

static inline void cpu_set_tls(CPUARMState *env, target_ulong newtls)
{
    if (access_secure_reg(env)) {
+6 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
#ifndef CRIS_TARGET_CPU_H
#define CRIS_TARGET_CPU_H

static inline void cpu_clone_regs(CPUCRISState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUCRISState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->regs[14] = newsp;
@@ -28,6 +29,10 @@ static inline void cpu_clone_regs(CPUCRISState *env, target_ulong newsp)
    env->regs[10] = 0;
}

static inline void cpu_clone_regs_parent(CPUCRISState *env, unsigned flags)
{
}

static inline void cpu_set_tls(CPUCRISState *env, target_ulong newtls)
{
    env->pregs[PR_PID] = (env->pregs[PR_PID] & 0xff) | newtls;
+6 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
#ifndef HPPA_TARGET_CPU_H
#define HPPA_TARGET_CPU_H

static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUHPPAState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->gr[30] = newsp;
@@ -31,6 +32,10 @@ static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp)
    env->iaoq_b = env->gr[31] + 4;
}

static inline void cpu_clone_regs_parent(CPUHPPAState *env, unsigned flags)
{
}

static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)
{
    env->cr[27] = newtls;
Loading