Commit 4a1418e0 authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Unbreak large mem support by removing kqemu



kqemu introduces a number of restrictions on the i386 target.  The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
the TSC as a time source which will not be reliable on a multiple processor
system in userspace.  Since most modern processors are multicore, this severely
limits the utility of kqemu.

kvm is a viable alternative for people looking to accelerate qemu and has the
benefit of being supported by the upstream Linux kernel.  If someone can
implement work arounds to remove the restrictions introduced by kqemu, I'm
happy to avoid and/or revert this patch.

N.B. kqemu will still function in the 0.11 series but this patch removes it from
the 0.12 series.

Paul, please Ack or Nack this patch.

Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 0953a80f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ Generic Subsystems:
Dynamic translator        Fabrice Bellard
Main loop                 Fabrice Bellard (new maintainer needed)
TCG                       Fabrice Bellard
kqemu interface           Fabrice Bellard
IDE device                ?
SCSI device               Paul Brook
PCI layer                 ?
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ all: $(PROGS)
#########################################################
# cpu emulator library
libobj-y = exec.o translate-all.o cpu-exec.o translate.o
libobj-$(CONFIG_KQEMU) += kqemu.o
libobj-y += tcg/tcg.o tcg/tcg-runtime.o
libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o
libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
+0 −27
Original line number Diff line number Diff line
@@ -185,7 +185,6 @@ vnc_sasl="yes"
bsd="no"
linux="no"
solaris="no"
kqemu="no"
profiler="no"
cocoa="no"
softmmu="yes"
@@ -238,25 +237,16 @@ MINGW32*)
GNU/kFreeBSD)
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
    kqemu="yes"
  fi
;;
FreeBSD)
  bsd="yes"
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
    kqemu="yes"
  fi
;;
DragonFly)
  bsd="yes"
  audio_drv_list="oss"
  audio_possible_drivers="oss sdl esd pa"
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
    kqemu="yes"
  fi
  aio="no"
;;
NetBSD)
@@ -320,9 +310,6 @@ SunOS)
        exit 1
      fi
    fi
    if test "$solarisrev" -ge 9 ; then
      kqemu="yes"
    fi
  fi
  if test -f /usr/include/sys/soundcard.h ; then
    audio_drv_list="oss"
@@ -343,7 +330,6 @@ AIX)
  usb="linux"
  kvm="yes"
  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
    kqemu="yes"
    audio_possible_drivers="$audio_possible_drivers fmod"
  fi
;;
@@ -358,9 +344,6 @@ if [ "$bsd" = "yes" ] ; then
fi

if test "$mingw32" = "yes" ; then
  if [ "$cpu" = "i386" ] ; then
    kqemu="yes"
  fi
  EXESUF=".exe"
  QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
  LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
@@ -450,8 +433,6 @@ for opt do
  ;;
  --disable-vde) vde="no"
  ;;
  --disable-kqemu) kqemu="no"
  ;;
  --disable-xen) xen="no"
  ;;
  --disable-brlapi) brlapi="no"
@@ -597,9 +578,6 @@ echo " --interp-prefix=PREFIX where to find shared libraries, etc."
echo "                           use %M for cpu name [$interp_prefix]"
echo "  --target-list=LIST       set target list [$target_list]"
echo ""
echo "kqemu kernel acceleration support:"
echo "  --disable-kqemu          disable kqemu support"
echo ""
echo "Advanced options (experts only):"
echo "  --source-path=PATH       path of source code [$source_path]"
echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
@@ -1534,7 +1512,6 @@ fi
if test -n "$sparc_cpu"; then
    echo "Target Sparc Arch $sparc_cpu"
fi
echo "kqemu support     $kqemu"
echo "xen support       $xen"
echo "brlapi support    $brlapi"
echo "Documentation     $build_docs"
@@ -2019,10 +1996,6 @@ case "$target_arch2" in
    if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
      echo "CONFIG_XEN=y" >> $config_mak
    fi
    if test $kqemu = "yes" -a "$target_softmmu" = "yes"
    then
      echo "CONFIG_KQEMU=y" >> $config_mak
    fi
esac
case "$target_arch2" in
  i386|x86_64|ppcemb|ppc|ppc64)
+0 −6
Original line number Diff line number Diff line
@@ -873,7 +873,6 @@ int cpu_memory_rw_debug(CPUState *env, target_ulong addr,

#define VGA_DIRTY_FLAG       0x01
#define CODE_DIRTY_FLAG      0x02
#define KQEMU_DIRTY_FLAG     0x04
#define MIGRATION_DIRTY_FLAG 0x08

/* read dirty bit (return 0 or 1) */
@@ -1056,14 +1055,9 @@ static inline int64_t profile_getclock(void)
    return cpu_get_real_ticks();
}

extern int64_t kqemu_time, kqemu_time_start;
extern int64_t qemu_time, qemu_time_start;
extern int64_t tlb_flush_time;
extern int64_t kqemu_exec_count;
extern int64_t dev_time;
extern int64_t kqemu_ret_int_count;
extern int64_t kqemu_ret_excp_count;
extern int64_t kqemu_ret_intr_count;
#endif

void cpu_inject_x86_mce(CPUState *cenv, int bank, uint64_t status,
+0 −5
Original line number Diff line number Diff line
@@ -10,12 +10,7 @@
#include "bswap.h"

/* address in the RAM (different from a physical address) */
#ifdef CONFIG_KQEMU
/* FIXME: This is wrong.  */
typedef uint32_t ram_addr_t;
#else
typedef unsigned long ram_addr_t;
#endif

/* memory API */

Loading