Commit 5a5c383b authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.13-pull-request' into staging



This pull request includes:
- fixes for some comments
- netlink update and fix
- rework/cleanup fo socket.h,
  including fixes for SPARC part.

# gpg: Signature made Fri 25 May 2018 09:16:21 BST
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-2.13-pull-request:
  gdbstub: Clarify what gdb_handlesig() is doing
  linux-user: define TARGET_SO_REUSEPORT
  linux-user: copy sparc/sockbits.h definitions from linux
  linux-user: update ARCH_HAS_SOCKET_TYPES use
  linux-user: move ppc socket.h definitions to ppc/sockbits.h
  linux-user: move socket.h generic definitions to generic/sockbits.h
  linux-user: move sparc/sparc64 socket.h definitions to sparc/sockbits.h
  linux-user: move alpha socket.h definitions to alpha/sockbits.h
  linux-user: move mips socket.h definitions to mips/sockbits.h
  linux-user: Fix payload size logic in host_to_target_cmsg()
  linux-user: update comments to point to tcg_exec_init()
  linux-user: update netlink emulation
  linux-user: Assert on bad type in thunk_type_align() and thunk_type_size()

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 62b9b076 4f710866
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -898,9 +898,10 @@ int main(int argc, char **argv)
        cpu_model = "any";
#endif
    }

    /* init tcg before creating CPUs and to get qemu_host_page_size */
    tcg_exec_init(0);
    /* NOTE: we need to init the CPU at this stage to get
       qemu_host_page_size */

    cpu_type = parse_cpu_model(cpu_model);
    cpu = cpu_create(cpu_type);
    env = cpu->env_ptr;
@@ -917,7 +918,7 @@ int main(int argc, char **argv)
    envlist_free(envlist);

    /*
     * Now that page sizes are configured in cpu_init() we can do
     * Now that page sizes are configured in tcg_exec_init() we can do
     * proper page alignment for guest_base.
     */
    guest_base = HOST_PAGE_ALIGN(guest_base);
+6 −0
Original line number Diff line number Diff line
@@ -1558,6 +1558,12 @@ void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va)
    *p = 0;
#ifdef CONFIG_USER_ONLY
    put_packet(s, s->syscall_buf);
    /* Return control to gdb for it to process the syscall request.
     * Since the protocol requires that gdb hands control back to us
     * using a "here are the results" F packet, we don't need to check
     * gdb_handlesig's return value (which is the signal to deliver if
     * execution was resumed via a continue packet).
     */
    gdb_handlesig(s->c_cpu, 0);
#else
    /* In this case wait to send the syscall packet until notification that
+15 −0
Original line number Diff line number Diff line
@@ -48,6 +48,21 @@ int use_gdb_syscalls(void);
void gdb_set_stop_cpu(CPUState *cpu);
void gdb_exit(CPUArchState *, int);
#ifdef CONFIG_USER_ONLY
/**
 * gdb_handlesig: yield control to gdb
 * @cpu: CPU
 * @sig: if non-zero, the signal number which caused us to stop
 *
 * This function yields control to gdb, when a user-mode-only target
 * needs to stop execution. If @sig is non-zero, then we will send a
 * stop packet to tell gdb that we have stopped because of this signal.
 *
 * This function will block (handling protocol requests from gdb)
 * until gdb tells us to continue target execution. When it does
 * return, the return value is a signal to deliver to the target,
 * or 0 if no signal should be delivered, ie the signal that caused
 * us to stop should be ignored.
 */
int gdb_handlesig(CPUState *, int);
void gdb_signalled(CPUArchState *, int);
void gdbserver_fork(CPUState *);
+2 −2
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
        se = struct_entries + type_ptr[1];
        return se->size[is_host];
    default:
        return -1;
        g_assert_not_reached();
    }
}

@@ -185,7 +185,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
        se = struct_entries + type_ptr[1];
        return se->align[is_host];
    default:
        return -1;
        g_assert_not_reached();
    }
}

+1 −0
Original line number Diff line number Diff line
#include "../generic/sockbits.h"
Loading