Commit 874ec3c5 authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging



* riku/linux-user-for-upstream: (21 commits)
  linux-user: Handle compressed ISA encodings when processing MIPS exceptions
  linux-user: Unlock mmap_lock when resuming guest from page_unprotect
  linux-user: Reset copied CPUs in cpu_copy() always
  linux-user: Fix epoll on ARM hosts
  linux-user: fix segmentation fault passing with h2g(x) != x
  linux-user: Fix pipe syscall return for SPARC
  linux-user: Fix target_stat and target_stat64 for OpenRISC
  linux-user: Avoid conditional cpu_reset()
  configure: Make NPTL non-optional
  linux-user: Enable NPTL for x86-64
  linux-user: Add i386 TLS setter
  linux-user: Clean up handling of clone() argument order
  linux-user: Add missing 'break' in i386 get_thread_area syscall
  linux-user: Enable NPTL for m68k
  linux-user: Enable NPTL for SPARC targets
  linux-user: Enable NPTL for OpenRISC
  linux-user: Move includes of target-specific headers to end of qemu.h
  configure: Enable threading for unicore32-linux-user
  configure: Enable threading on all ppc and mips linux-user targets
  configure: Don't say target_nptl="no" if there is no linux-user target
  ...

Conflicts:
	linux-user/main.c

Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parents d2f5ea97 a0333817
Loading
Loading
Loading
Loading
+3 −31
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@ curl=""
curses=""
docs=""
fdt=""
nptl=""
pixman=""
sdl=""
virtfs=""
@@ -856,10 +855,6 @@ for opt do
  ;;
  --enable-fdt) fdt="yes"
  ;;
  --disable-nptl) nptl="no"
  ;;
  --enable-nptl) nptl="yes"
  ;;
  --enable-mixemu) mixemu="yes"
  ;;
  --disable-linux-aio) linux_aio="no"
@@ -1103,8 +1098,6 @@ echo " --enable-kvm enable KVM acceleration support"
echo "  --disable-rdma           disable RDMA-based migration support"
echo "  --enable-rdma            enable RDMA-based migration support"
echo "  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
echo "  --disable-nptl           disable usermode NPTL support"
echo "  --enable-nptl            enable usermode NPTL support"
echo "  --enable-system          enable all system emulation targets"
echo "  --disable-system         disable all system emulation targets"
echo "  --enable-user            enable supported user emulation targets"
@@ -1439,7 +1432,7 @@ fi
##########################################
# NPTL probe

if test "$nptl" != "no" ; then
if test "$linux_user" = "yes"; then
  cat > $TMPC <<EOF
#include <sched.h>
#include <linux/futex.h>
@@ -1450,15 +1443,9 @@ int main(void) {
  return 0;
}
EOF

  if compile_object ; then
    nptl=yes
  else
    if test "$nptl" = "yes" ; then
  if ! compile_object ; then
    feature_not_found "nptl"
  fi
    nptl=no
  fi
fi

##########################################
@@ -3581,7 +3568,6 @@ echo "bluez support $bluez"
echo "Documentation     $docs"
[ ! -z "$uname_release" ] && \
echo "uname -r          $uname_release"
echo "NPTL support      $nptl"
echo "GUEST_BASE        $guest_base"
echo "PIE               $pie"
echo "vde support       $vde"
@@ -4216,7 +4202,6 @@ mkdir -p $target_dir
echo "# Automatically generated by configure - do not modify" > $config_target_mak

bflt="no"
target_nptl="no"
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_name/g"`
gdb_xml_files=""

@@ -4231,16 +4216,13 @@ case "$target_name" in
    TARGET_BASE_ARCH=i386
  ;;
  alpha)
    target_nptl="yes"
  ;;
  arm|armeb)
    TARGET_ARCH=arm
    bflt="yes"
    target_nptl="yes"
    gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
  ;;
  cris)
    target_nptl="yes"
  ;;
  lm32)
  ;;
@@ -4251,12 +4233,10 @@ case "$target_name" in
  microblaze|microblazeel)
    TARGET_ARCH=microblaze
    bflt="yes"
    target_nptl="yes"
  ;;
  mips|mipsel)
    TARGET_ARCH=mips
    echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
    target_nptl="yes"
  ;;
  mipsn32|mipsn32el)
    TARGET_ARCH=mips64
@@ -4277,13 +4257,11 @@ case "$target_name" in
  ;;
  ppc)
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
    target_nptl="yes"
  ;;
  ppcemb)
    TARGET_BASE_ARCH=ppc
    TARGET_ABI_DIR=ppc
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
    target_nptl="yes"
  ;;
  ppc64)
    TARGET_BASE_ARCH=ppc
@@ -4300,7 +4278,6 @@ case "$target_name" in
  sh4|sh4eb)
    TARGET_ARCH=sh4
    bflt="yes"
    target_nptl="yes"
  ;;
  sparc)
  ;;
@@ -4314,7 +4291,6 @@ case "$target_name" in
    echo "TARGET_ABI32=y" >> $config_target_mak
  ;;
  s390x)
    target_nptl="yes"
  ;;
  unicore32)
  ;;
@@ -4396,10 +4372,6 @@ fi
if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
  echo "TARGET_HAS_BFLT=y" >> $config_target_mak
fi
if test "$target_user_only" = "yes" \
        -a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
  echo "CONFIG_USE_NPTL=y" >> $config_target_mak
fi
if test "$target_user_only" = "yes" -a "$guest_base" = "yes"; then
  echo "CONFIG_USE_GUEST_BASE=y" >> $config_target_mak
fi
+4 −0
Original line number Diff line number Diff line
@@ -646,6 +646,10 @@ CPUArchState *cpu_copy(CPUArchState *env)
    CPUWatchpoint *wp;
#endif

    /* Reset non arch specific state */
    cpu_reset(ENV_GET_CPU(new_env));

    /* Copy arch specific state into the new CPU */
    memcpy(new_env, env, sizeof(CPUArchState));

    /* Clone all break/watchpoints.
+6 −2
Original line number Diff line number Diff line
@@ -210,11 +210,15 @@ extern unsigned long reserved_va;
})
#endif

#define h2g(x) ({ \
#define h2g_nocheck(x) ({ \
    unsigned long __ret = (unsigned long)(x) - GUEST_BASE; \
    (abi_ulong)__ret; \
})

#define h2g(x) ({ \
    /* Check if given address fits target address space */ \
    assert(h2g_valid(x)); \
    (abi_ulong)__ret; \
    h2g_nocheck(x); \
})

#define saddr(x) g2h(x)
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ void gdb_register_coprocessor(CPUState *cpu,

static inline int cpu_index(CPUState *cpu)
{
#if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL)
#if defined(CONFIG_USER_ONLY)
    return cpu->host_tid;
#else
    return cpu->cpu_index + 1;
+2 −0
Original line number Diff line number Diff line
@@ -40,3 +40,5 @@ struct target_pt_regs {
#else
#define UNAME_MACHINE "armv5tel"
#endif

#define TARGET_CLONE_BACKWARDS
Loading