* Latest qemu tcg breakage
@ 2008-06-09 13:53 Jerone Young
2008-06-09 16:15 ` Avi Kivity
2008-06-09 16:35 ` Anthony Liguori
0 siblings, 2 replies; 9+ messages in thread
From: Jerone Young @ 2008-06-09 13:53 UTC (permalink / raw)
To: kvm; +Cc: kvm-ppc-devel
So upstream qemu is being pervasive about changes with TCG, starting to
place tcg only functions in exec.c . I've spun a quick patch that fixes
things for PowerPC when building qemu. But we need to try and isolate
TCG in upstream qemu as it is starting to leak, and I'm not sure of a
good way to fix it as there is no CONFIG defined for tcg currently.
Just something to keep in mind.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
LIBOBJS+=fake-exec.o
else
LIBOBJS+= translate-all.o translate.o
-endif
ifdef CONFIG_DYNGEN_OP
LIBOBJS+=op.o
endif
@@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
ifeq ($(ARCH),sparc64)
CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
+endif
endif
ifeq ($(USE_KVM), 1)
diff --git a/qemu/exec.c b/qemu/exec.c
--- a/qemu/exec.c
+++ b/qemu/exec.c
@@ -37,8 +37,11 @@
#include "exec-all.h"
#include "qemu-common.h"
+#ifdef USE_KVM
+#include "qemu-kvm.h"
+#else
#include "tcg.h"
-#include "qemu-kvm.h"
+#endif
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
@@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
cpu_fprintf(f, "TB invalidate count %d\n",
tb_phys_invalidate_count);
cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
+#if !defined(USE_KVM)
tcg_dump_info(f, cpu_fprintf);
+#endif
}
#if !defined(CONFIG_USER_ONLY)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 13:53 Latest qemu tcg breakage Jerone Young
@ 2008-06-09 16:15 ` Avi Kivity
2008-06-09 16:35 ` Anthony Liguori
1 sibling, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-06-09 16:15 UTC (permalink / raw)
To: jyoung5; +Cc: kvm, kvm-ppc-devel
Jerone Young wrote:
> So upstream qemu is being pervasive about changes with TCG, starting to
> place tcg only functions in exec.c . I've spun a quick patch that fixes
> things for PowerPC when building qemu. But we need to try and isolate
> TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> good way to fix it as there is no CONFIG defined for tcg currently.
>
>
> ifeq ($(USE_KVM), 1)
> diff --git a/qemu/exec.c b/qemu/exec.c
> --- a/qemu/exec.c
> +++ b/qemu/exec.c
> @@ -37,8 +37,11 @@
> #include "exec-all.h"
> #include "qemu-common.h"
>
> +#ifdef USE_KVM
> +#include "qemu-kvm.h"
> +#else
> #include "tcg.h"
> -#include "qemu-kvm.h"
> +#endif
>
We want to keep the ability to have both emulation (-no-kvm) and
virtualization, at least for x86, so let's keep tcg.h includable.
>
> #if defined(CONFIG_USER_ONLY)
> #include <qemu.h>
> @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
> cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
> cpu_fprintf(f, "TB invalidate count %d\n",
> tb_phys_invalidate_count);
> cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
> +#if !defined(USE_KVM)
> tcg_dump_info(f, cpu_fprintf);
> +#endif
> }
>
>
How about
#define tcg_dump_info(x, y) (void)0
in some strategic spot?
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 13:53 Latest qemu tcg breakage Jerone Young
2008-06-09 16:15 ` Avi Kivity
@ 2008-06-09 16:35 ` Anthony Liguori
2008-06-09 16:55 ` Jerone Young
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Anthony Liguori @ 2008-06-09 16:35 UTC (permalink / raw)
To: jyoung5; +Cc: kvm, kvm-ppc-devel
Jerone Young wrote:
> So upstream qemu is being pervasive about changes with TCG, starting to
> place tcg only functions in exec.c . I've spun a quick patch that fixes
> things for PowerPC when building qemu. But we need to try and isolate
> TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> good way to fix it as there is no CONFIG defined for tcg currently.
>
> Just something to keep in mind.
>
Now that TCG supports PPC, shouldn't ya'll be able to drop
--disable-cpu-emulation. I believe that will simultaneously fix your
problem and reduce the difference between upstream QEMU.
Regards,
Anthony Liguori
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> diff --git a/qemu/Makefile.target b/qemu/Makefile.target
> --- a/qemu/Makefile.target
> +++ b/qemu/Makefile.target
> @@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
> LIBOBJS+=fake-exec.o
> else
> LIBOBJS+= translate-all.o translate.o
> -endif
> ifdef CONFIG_DYNGEN_OP
> LIBOBJS+=op.o
> endif
> @@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
> CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
> ifeq ($(ARCH),sparc64)
> CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
> +endif
> endif
>
> ifeq ($(USE_KVM), 1)
> diff --git a/qemu/exec.c b/qemu/exec.c
> --- a/qemu/exec.c
> +++ b/qemu/exec.c
> @@ -37,8 +37,11 @@
> #include "exec-all.h"
> #include "qemu-common.h"
>
> +#ifdef USE_KVM
> +#include "qemu-kvm.h"
> +#else
> #include "tcg.h"
> -#include "qemu-kvm.h"
> +#endif
>
> #if defined(CONFIG_USER_ONLY)
> #include <qemu.h>
> @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
> cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
> cpu_fprintf(f, "TB invalidate count %d\n",
> tb_phys_invalidate_count);
> cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
> +#if !defined(USE_KVM)
> tcg_dump_info(f, cpu_fprintf);
> +#endif
> }
>
> #if !defined(CONFIG_USER_ONLY)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 16:35 ` Anthony Liguori
@ 2008-06-09 16:55 ` Jerone Young
2008-06-09 20:51 ` Jerone Young
2008-06-23 20:06 ` Hollis Blanchard
2 siblings, 0 replies; 9+ messages in thread
From: Jerone Young @ 2008-06-09 16:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm, kvm-ppc-devel
On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
> Jerone Young wrote:
> > So upstream qemu is being pervasive about changes with TCG, starting to
> > place tcg only functions in exec.c . I've spun a quick patch that fixes
> > things for PowerPC when building qemu. But we need to try and isolate
> > TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> > good way to fix it as there is no CONFIG defined for tcg currently.
> >
> > Just something to keep in mind.
> >
>
> Now that TCG supports PPC, shouldn't ya'll be able to drop
> --disable-cpu-emulation. I believe that will simultaneously fix your
> problem and reduce the difference between upstream QEMU.
Hmm...this may just be what is needed. Building upstream CVS works.
Actually building without --disable-cpu-emulation WORKS.
So given this I'll create a patch to remove --disable-cpu-emulation and
the fake cpu-exec files we have.
>
> Regards,
>
> Anthony Liguori
>
> > Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> >
> > diff --git a/qemu/Makefile.target b/qemu/Makefile.target
> > --- a/qemu/Makefile.target
> > +++ b/qemu/Makefile.target
> > @@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
> > LIBOBJS+=fake-exec.o
> > else
> > LIBOBJS+= translate-all.o translate.o
> > -endif
> > ifdef CONFIG_DYNGEN_OP
> > LIBOBJS+=op.o
> > endif
> > @@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
> > CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
> > ifeq ($(ARCH),sparc64)
> > CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
> > +endif
> > endif
> >
> > ifeq ($(USE_KVM), 1)
> > diff --git a/qemu/exec.c b/qemu/exec.c
> > --- a/qemu/exec.c
> > +++ b/qemu/exec.c
> > @@ -37,8 +37,11 @@
> > #include "exec-all.h"
> > #include "qemu-common.h"
> >
> > +#ifdef USE_KVM
> > +#include "qemu-kvm.h"
> > +#else
> > #include "tcg.h"
> > -#include "qemu-kvm.h"
> > +#endif
> >
> > #if defined(CONFIG_USER_ONLY)
> > #include <qemu.h>
> > @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
> > cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
> > cpu_fprintf(f, "TB invalidate count %d\n",
> > tb_phys_invalidate_count);
> > cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
> > +#if !defined(USE_KVM)
> > tcg_dump_info(f, cpu_fprintf);
> > +#endif
> > }
> >
> > #if !defined(CONFIG_USER_ONLY)
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 16:35 ` Anthony Liguori
2008-06-09 16:55 ` Jerone Young
@ 2008-06-09 20:51 ` Jerone Young
2008-06-09 21:02 ` Anthony Liguori
2008-06-23 20:06 ` Hollis Blanchard
2 siblings, 1 reply; 9+ messages in thread
From: Jerone Young @ 2008-06-09 20:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm, kvm-ppc-devel
[-- Attachment #1: Type: text/plain, Size: 3179 bytes --]
Actually I was mistaken. While upstream qemu does compile, after doing a
clean on my local directory of kvm-userspace. I'm finding that after
removing cpu-emulation stuff I get a error when building exec.c
In file included from /home/jerone/work/kvm-userspace/qemu/tcg/tcg.h:50,
from /home/jerone/work/kvm-userspace/qemu/exec.c:40:
/home/jerone/work/kvm-userspace/qemu/tcg/tcg-opc.h:25:24: dyngen-opc.h:
No such file or directory
Now removing CONFIG_DYNGEN from configure yields more errors ;-). This
is removed for x86 & ia64.
So lets not remove it till can git this sorted out. But here is a patch
attached to play with :-L
On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
> Jerone Young wrote:
> > So upstream qemu is being pervasive about changes with TCG, starting to
> > place tcg only functions in exec.c . I've spun a quick patch that fixes
> > things for PowerPC when building qemu. But we need to try and isolate
> > TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> > good way to fix it as there is no CONFIG defined for tcg currently.
> >
> > Just something to keep in mind.
> >
>
> Now that TCG supports PPC, shouldn't ya'll be able to drop
> --disable-cpu-emulation. I believe that will simultaneously fix your
> problem and reduce the difference between upstream QEMU.
>
> Regards,
>
> Anthony Liguori
>
> > Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> >
> > diff --git a/qemu/Makefile.target b/qemu/Makefile.target
> > --- a/qemu/Makefile.target
> > +++ b/qemu/Makefile.target
> > @@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
> > LIBOBJS+=fake-exec.o
> > else
> > LIBOBJS+= translate-all.o translate.o
> > -endif
> > ifdef CONFIG_DYNGEN_OP
> > LIBOBJS+=op.o
> > endif
> > @@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
> > CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
> > ifeq ($(ARCH),sparc64)
> > CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
> > +endif
> > endif
> >
> > ifeq ($(USE_KVM), 1)
> > diff --git a/qemu/exec.c b/qemu/exec.c
> > --- a/qemu/exec.c
> > +++ b/qemu/exec.c
> > @@ -37,8 +37,11 @@
> > #include "exec-all.h"
> > #include "qemu-common.h"
> >
> > +#ifdef USE_KVM
> > +#include "qemu-kvm.h"
> > +#else
> > #include "tcg.h"
> > -#include "qemu-kvm.h"
> > +#endif
> >
> > #if defined(CONFIG_USER_ONLY)
> > #include <qemu.h>
> > @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
> > cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
> > cpu_fprintf(f, "TB invalidate count %d\n",
> > tb_phys_invalidate_count);
> > cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
> > +#if !defined(USE_KVM)
> > tcg_dump_info(f, cpu_fprintf);
> > +#endif
> > }
> >
> > #if !defined(CONFIG_USER_ONLY)
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: remove_cpu_emulation --]
[-- Type: text/plain, Size: 8363 bytes --]
Remove qemu files and entries associated with --disable-cpu-emulation configure argument.
Signed-off-by: Jerone Young <jyoung5@.us.ibm.com>
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -192,11 +192,7 @@ all: $(PROGS)
# cpu emulator library
LIBOBJS=exec.o kqemu.o cpu-exec.o host-utils.o
-ifeq ($(NO_CPU_EMULATION), 1)
-LIBOBJS+=fake-exec.o
-else
LIBOBJS+= translate-all.o translate.o
-endif
ifdef CONFIG_DYNGEN_OP
LIBOBJS+=op.o
endif
diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -116,7 +116,6 @@ uname_release=""
uname_release=""
curses="yes"
nptl="yes"
-cpu_emulation="yes"
device_tree_support=""
# OS specific
@@ -353,8 +352,6 @@ for opt do
;;
--disable-nptl) nptl="no"
;;
- --disable-cpu-emulation) cpu_emulation="no"
- ;;
--disable-libfdt) device_tree_support="no"
;;
*) echo "ERROR: unknown option $opt"; exit 1
@@ -463,7 +460,6 @@ echo " --fmod-inc path to
echo " --fmod-inc path to FMOD includes"
echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
-echo " --disable-cpu-emulation disables use of qemu cpu emulation code"
echo " --disable-libfdt disables use of libfdt support for device tree"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
@@ -926,7 +922,6 @@ fi
fi
echo "kqemu support $kqemu"
echo "kvm support $kvm"
-echo "CPU emulation $cpu_emulation"
if test $cpu = "powerpc"; then
echo "libfdt support $device_tree_support"
fi
@@ -1291,13 +1286,6 @@ interp_prefix1=`echo "$interp_prefix" |
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
-disable_cpu_emulation() {
- if test $cpu_emulation = "no"; then
- echo "#define NO_CPU_EMULATION 1" >> $config_h
- echo "NO_CPU_EMULATION=1" >> $config_mak
- fi
-}
-
configure_kvm() {
if test $kvm = "yes" -a "$target_softmmu" = "yes" -a \
\( "$cpu" = "i386" -o "$cpu" = "x86_64" -o "$cpu" = "ia64" -o "$cpu" = "powerpc" \); then
@@ -1308,7 +1296,6 @@ configure_kvm() {
echo "USE_KVM_PIT=1" >> $config_mak
echo "#define USE_KVM_PIT 1" >> $config_h
fi
- disable_cpu_emulation
fi
}
diff --git a/qemu/target-i386/fake-exec.c b/qemu/target-i386/fake-exec.c
deleted file mode 100644
--- a/qemu/target-i386/fake-exec.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * fake-exec.c
- *
- * This is a file for stub functions so that compilation is possible
- * when TCG CPU emulation is disabled during compilation.
- *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
- * Jerone Young <jyoung5@us.ibm.com>
- * This work is licensed under the GNU GPL licence version 2 or later.
- *
- */
-#include "exec.h"
-#include "cpu.h"
-
-int code_copy_enabled = 0;
-
-CCTable cc_table[CC_OP_NB];
-
-void cpu_dump_statistics (CPUState *env, FILE*f,
- int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
- int flags)
-{
-}
-
-unsigned long code_gen_max_block_size(void)
-{
- return 32;
-}
-
-void cpu_gen_init(void)
-{
-}
-
-int cpu_restore_state(TranslationBlock *tb,
- CPUState *env, unsigned long searched_pc,
- void *puc)
-
-{
- return 0;
-}
-
-int cpu_x86_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
-{
- return 0;
-}
-
-void flush_icache_range(unsigned long start, unsigned long stop)
-{
-}
-
-void optimize_flags_init(void)
-{
-}
diff --git a/qemu/target-ia64/fake-exec.c b/qemu/target-ia64/fake-exec.c
deleted file mode 100644
--- a/qemu/target-ia64/fake-exec.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * fake-exec.c for ia64.
- *
- * This is a file for stub functions so that compilation is possible
- * when TCG CPU emulation is disabled during compilation.
- *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
- * Jerone Young <jyoung5@us.ibm.com>
- *
- * Copyright 2008 Intel Corporation.
- * Added by Xiantao Zhang <xiantao.zhang@intel.com>
- *
- * This work is licensed under the GNU GPL licence version 2 or later.
- *
- */
-#include "exec.h"
-#include "cpu.h"
-
-int code_copy_enabled = 0;
-
-void cpu_gen_init(void)
-{
-}
-
-unsigned long code_gen_max_block_size(void)
-{
- return 32;
-}
-
-int cpu_ia64_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
-{
- return 0;
-}
-
-void flush_icache_range(unsigned long start, unsigned long stop)
-{
- while (start < stop) {
- asm volatile ("fc %0" :: "r"(start));
- start += 32;
- }
- asm volatile (";;sync.i;;srlz.i;;");
-}
-
diff --git a/qemu/target-ppc/fake-exec.c b/qemu/target-ppc/fake-exec.c
deleted file mode 100644
--- a/qemu/target-ppc/fake-exec.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * fake-exec.c
- *
- * This is a file for stub functions so that compilation is possible
- * when TCG CPU emulation is disabled during compilation.
- *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
- * Jerone Young <jyoung5@us.ibm.com>
- * This work is licensed under the GNU GPL licence version 2 or later.
- *
- */
-
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include "cpu.h"
-#include "exec-all.h"
-
-
-struct ppc_def_t {
- const unsigned char *name;
- uint32_t pvr;
- uint32_t svr;
- uint64_t insns_flags;
- uint64_t msr_mask;
- powerpc_mmu_t mmu_model;
- powerpc_excp_t excp_model;
- powerpc_input_t bus_model;
- uint32_t flags;
- int bfd_mach;
- void (*init_proc)(CPUPPCState *env);
- int (*check_pow)(CPUPPCState *env);
-};
-
-int code_copy_enabled = 0;
-
-void cpu_dump_state (CPUState *env, FILE *f,
- int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
- int flags)
-{
-}
-
-void ppc_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
-{
-}
-
-void cpu_dump_statistics (CPUState *env, FILE*f,
- int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
- int flags)
-{
-}
-
-unsigned long code_gen_max_block_size(void)
-{
- return 32;
-}
-
-void cpu_gen_init(void)
-{
-}
-
-int cpu_restore_state(TranslationBlock *tb,
- CPUState *env, unsigned long searched_pc,
- void *puc)
-
-{
- return 0;
-}
-
-int cpu_ppc_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
-{
- return 0;
-}
-
-void init_proc_ppc440ep_kvm(CPUPPCState *env)
-{
- ppc40x_irq_init(env);
-}
-
-static ppc_def_t ppc440ep_kvm = {
- .name = "440EP KVM",
- .mmu_model = POWERPC_MMU_SOFT_4xx, /*XXX needed for GDB stub */
- .init_proc = init_proc_ppc440ep_kvm,
-};
-
-const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name)
-{
- return &ppc440ep_kvm;
-}
-
-int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
-{
- env->mmu_model = def->mmu_model;
- (*def->init_proc)(env);
- return 0;
-}
-
-void flush_icache_range(unsigned long start, unsigned long stop)
-{
-}
diff --git a/qemu/vl.c b/qemu/vl.c
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -7786,9 +7786,7 @@ static void help(int exitcode)
"-no-kqemu disable KQEMU kernel module usage\n"
#endif
#ifdef USE_KVM
-#ifndef NO_CPU_EMULATION
"-no-kvm disable KVM hardware virtualization\n"
-#endif
"-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC\n"
"-no-kvm-pit disable KVM kernel mode PIT\n"
#endif
@@ -7997,9 +7995,7 @@ const QEMUOption qemu_options[] = {
{ "kernel-kqemu", 0, QEMU_OPTION_kernel_kqemu },
#endif
#ifdef USE_KVM
-#ifndef NO_CPU_EMULATION
{ "no-kvm", 0, QEMU_OPTION_no_kvm },
-#endif
{ "no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip },
{ "no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit },
#endif
@@ -9083,10 +9079,6 @@ int main(int argc, char **argv)
if (kvm_qemu_init() < 0) {
extern int kvm_allowed;
fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
-#ifdef NO_CPU_EMULATION
- fprintf(stderr, "Compiled with --disable-cpu-emulation, exiting.\n");
- exit(1);
-#endif
kvm_allowed = 0;
}
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 20:51 ` Jerone Young
@ 2008-06-09 21:02 ` Anthony Liguori
2008-06-09 21:09 ` Jerone Young
0 siblings, 1 reply; 9+ messages in thread
From: Anthony Liguori @ 2008-06-09 21:02 UTC (permalink / raw)
To: jyoung5; +Cc: kvm, kvm-ppc-devel
Jerone Young wrote:
> Actually I was mistaken. While upstream qemu does compile, after doing a
> clean on my local directory of kvm-userspace. I'm finding that after
> removing cpu-emulation stuff I get a error when building exec.c
>
> In file included from /home/jerone/work/kvm-userspace/qemu/tcg/tcg.h:50,
> from /home/jerone/work/kvm-userspace/qemu/exec.c:40:
> /home/jerone/work/kvm-userspace/qemu/tcg/tcg-opc.h:25:24: dyngen-opc.h:
> No such file or directory
>
dyngen-opc.h is build from op.o. If you removed CONFIG_DYNGEN_OP, op.o
won't be added to LIBOBJS which would cause this problem.
> Now removing CONFIG_DYNGEN from configure yields more errors ;-). This
> is removed for x86 & ia64.
>
Don't do that. PPC still depends on dyngen. Nothing is wrong with
dyngen on PPC, the problem was that TCG didn't support PPC. It does now
though.
Regards,
Anthony Liguori
> So lets not remove it till can git this sorted out. But here is a patch
> attached to play with :-L
>
>
> On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
>
>> Jerone Young wrote:
>>
>>> So upstream qemu is being pervasive about changes with TCG, starting to
>>> place tcg only functions in exec.c . I've spun a quick patch that fixes
>>> things for PowerPC when building qemu. But we need to try and isolate
>>> TCG in upstream qemu as it is starting to leak, and I'm not sure of a
>>> good way to fix it as there is no CONFIG defined for tcg currently.
>>>
>>> Just something to keep in mind.
>>>
>>>
>> Now that TCG supports PPC, shouldn't ya'll be able to drop
>> --disable-cpu-emulation. I believe that will simultaneously fix your
>> problem and reduce the difference between upstream QEMU.
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>
>>> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>>>
>>> diff --git a/qemu/Makefile.target b/qemu/Makefile.target
>>> --- a/qemu/Makefile.target
>>> +++ b/qemu/Makefile.target
>>> @@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
>>> LIBOBJS+=fake-exec.o
>>> else
>>> LIBOBJS+= translate-all.o translate.o
>>> -endif
>>> ifdef CONFIG_DYNGEN_OP
>>> LIBOBJS+=op.o
>>> endif
>>> @@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
>>> CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
>>> ifeq ($(ARCH),sparc64)
>>> CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
>>> +endif
>>> endif
>>>
>>> ifeq ($(USE_KVM), 1)
>>> diff --git a/qemu/exec.c b/qemu/exec.c
>>> --- a/qemu/exec.c
>>> +++ b/qemu/exec.c
>>> @@ -37,8 +37,11 @@
>>> #include "exec-all.h"
>>> #include "qemu-common.h"
>>>
>>> +#ifdef USE_KVM
>>> +#include "qemu-kvm.h"
>>> +#else
>>> #include "tcg.h"
>>> -#include "qemu-kvm.h"
>>> +#endif
>>>
>>> #if defined(CONFIG_USER_ONLY)
>>> #include <qemu.h>
>>> @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
>>> cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
>>> cpu_fprintf(f, "TB invalidate count %d\n",
>>> tb_phys_invalidate_count);
>>> cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
>>> +#if !defined(USE_KVM)
>>> tcg_dump_info(f, cpu_fprintf);
>>> +#endif
>>> }
>>>
>>> #if !defined(CONFIG_USER_ONLY)
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 21:02 ` Anthony Liguori
@ 2008-06-09 21:09 ` Jerone Young
0 siblings, 0 replies; 9+ messages in thread
From: Jerone Young @ 2008-06-09 21:09 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm, kvm-ppc-devel
On Mon, 2008-06-09 at 16:02 -0500, Anthony Liguori wrote:
> Jerone Young wrote:
> > Actually I was mistaken. While upstream qemu does compile, after doing a
> > clean on my local directory of kvm-userspace. I'm finding that after
> > removing cpu-emulation stuff I get a error when building exec.c
> >
> > In file included from /home/jerone/work/kvm-userspace/qemu/tcg/tcg.h:50,
> > from /home/jerone/work/kvm-userspace/qemu/exec.c:40:
> > /home/jerone/work/kvm-userspace/qemu/tcg/tcg-opc.h:25:24: dyngen-opc.h:
> > No such file or directory
> >
>
> dyngen-opc.h is build from op.o. If you removed CONFIG_DYNGEN_OP, op.o
> won't be added to LIBOBJS which would cause this problem.
Yeah did that .. got a lot more errors after that. Something else is in
the mix. I'll try and figure it out tonight.
>
> > Now removing CONFIG_DYNGEN from configure yields more errors ;-). This
> > is removed for x86 & ia64.
> >
>
> Don't do that. PPC still depends on dyngen. Nothing is wrong with
> dyngen on PPC, the problem was that TCG didn't support PPC. It does now
> though.
>
> Regards,
>
> Anthony Liguori
>
> > So lets not remove it till can git this sorted out. But here is a patch
> > attached to play with :-L
> >
> >
> > On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
> >
> >> Jerone Young wrote:
> >>
> >>> So upstream qemu is being pervasive about changes with TCG, starting to
> >>> place tcg only functions in exec.c . I've spun a quick patch that fixes
> >>> things for PowerPC when building qemu. But we need to try and isolate
> >>> TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> >>> good way to fix it as there is no CONFIG defined for tcg currently.
> >>>
> >>> Just something to keep in mind.
> >>>
> >>>
> >> Now that TCG supports PPC, shouldn't ya'll be able to drop
> >> --disable-cpu-emulation. I believe that will simultaneously fix your
> >> problem and reduce the difference between upstream QEMU.
> >>
> >> Regards,
> >>
> >> Anthony Liguori
> >>
> >>
> >>> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> >>>
> >>> diff --git a/qemu/Makefile.target b/qemu/Makefile.target
> >>> --- a/qemu/Makefile.target
> >>> +++ b/qemu/Makefile.target
> >>> @@ -196,7 +196,6 @@ LIBOBJS+=fake-exec.o
> >>> LIBOBJS+=fake-exec.o
> >>> else
> >>> LIBOBJS+= translate-all.o translate.o
> >>> -endif
> >>> ifdef CONFIG_DYNGEN_OP
> >>> LIBOBJS+=op.o
> >>> endif
> >>> @@ -205,6 +204,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH
> >>> CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
> >>> ifeq ($(ARCH),sparc64)
> >>> CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
> >>> +endif
> >>> endif
> >>>
> >>> ifeq ($(USE_KVM), 1)
> >>> diff --git a/qemu/exec.c b/qemu/exec.c
> >>> --- a/qemu/exec.c
> >>> +++ b/qemu/exec.c
> >>> @@ -37,8 +37,11 @@
> >>> #include "exec-all.h"
> >>> #include "qemu-common.h"
> >>>
> >>> +#ifdef USE_KVM
> >>> +#include "qemu-kvm.h"
> >>> +#else
> >>> #include "tcg.h"
> >>> -#include "qemu-kvm.h"
> >>> +#endif
> >>>
> >>> #if defined(CONFIG_USER_ONLY)
> >>> #include <qemu.h>
> >>> @@ -3197,7 +3200,9 @@ void dump_exec_info(FILE *f,
> >>> cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
> >>> cpu_fprintf(f, "TB invalidate count %d\n",
> >>> tb_phys_invalidate_count);
> >>> cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
> >>> +#if !defined(USE_KVM)
> >>> tcg_dump_info(f, cpu_fprintf);
> >>> +#endif
> >>> }
> >>>
> >>> #if !defined(CONFIG_USER_ONLY)
> >>>
> >>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe kvm" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>>
> >>>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe kvm" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-09 16:35 ` Anthony Liguori
2008-06-09 16:55 ` Jerone Young
2008-06-09 20:51 ` Jerone Young
@ 2008-06-23 20:06 ` Hollis Blanchard
2008-06-24 2:33 ` Anthony Liguori
2 siblings, 1 reply; 9+ messages in thread
From: Hollis Blanchard @ 2008-06-23 20:06 UTC (permalink / raw)
To: Anthony Liguori; +Cc: jyoung5, kvm, kvm-ppc-devel
On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
> Jerone Young wrote:
> > So upstream qemu is being pervasive about changes with TCG, starting to
> > place tcg only functions in exec.c . I've spun a quick patch that fixes
> > things for PowerPC when building qemu. But we need to try and isolate
> > TCG in upstream qemu as it is starting to leak, and I'm not sure of a
> > good way to fix it as there is no CONFIG defined for tcg currently.
> >
> > Just something to keep in mind.
> >
>
> Now that TCG supports PPC, shouldn't ya'll be able to drop
> --disable-cpu-emulation. I believe that will simultaneously fix your
> problem and reduce the difference between upstream QEMU.
Unfortunately, dropping --disable-cpu-emulation would create a gcc3
dependency for us, which would suck. (Qemu still uses dyngen for
PowerPC, and it does still require gcc3.)
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Latest qemu tcg breakage
2008-06-23 20:06 ` Hollis Blanchard
@ 2008-06-24 2:33 ` Anthony Liguori
0 siblings, 0 replies; 9+ messages in thread
From: Anthony Liguori @ 2008-06-24 2:33 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: jyoung5, kvm, kvm-ppc-devel
Hollis Blanchard wrote:
> On Mon, 2008-06-09 at 11:35 -0500, Anthony Liguori wrote:
>
>> Jerone Young wrote:
>>
>>> So upstream qemu is being pervasive about changes with TCG, starting to
>>> place tcg only functions in exec.c . I've spun a quick patch that fixes
>>> things for PowerPC when building qemu. But we need to try and isolate
>>> TCG in upstream qemu as it is starting to leak, and I'm not sure of a
>>> good way to fix it as there is no CONFIG defined for tcg currently.
>>>
>>> Just something to keep in mind.
>>>
>>>
>> Now that TCG supports PPC, shouldn't ya'll be able to drop
>> --disable-cpu-emulation. I believe that will simultaneously fix your
>> problem and reduce the difference between upstream QEMU.
>>
>
> Unfortunately, dropping --disable-cpu-emulation would create a gcc3
> dependency for us, which would suck. (Qemu still uses dyngen for
> PowerPC, and it does still require gcc3.)
>
But there's always been a GCC3 dependency. --disable-cpu-emulation was
working around the breakage caused by TCG's introduction. That's been
fixed.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-06-24 2:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 13:53 Latest qemu tcg breakage Jerone Young
2008-06-09 16:15 ` Avi Kivity
2008-06-09 16:35 ` Anthony Liguori
2008-06-09 16:55 ` Jerone Young
2008-06-09 20:51 ` Jerone Young
2008-06-09 21:02 ` Anthony Liguori
2008-06-09 21:09 ` Jerone Young
2008-06-23 20:06 ` Hollis Blanchard
2008-06-24 2:33 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox