From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 23/24] Get CONFIG_CPU_EMULATION back to life Date: Fri, 18 Sep 2009 16:54:55 -0300 Message-ID: <20090918195455.GB16767@amt.cnet> References: <67026adfd83b7e99dd1425ed9a7d7594e5543ad6.1253272938.git.quintela@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Juan Quintela Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32770 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753969AbZIRT5q (ORCPT ); Fri, 18 Sep 2009 15:57:46 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8IJvoSg023600 for ; Fri, 18 Sep 2009 15:57:50 -0400 Content-Disposition: inline In-Reply-To: <67026adfd83b7e99dd1425ed9a7d7594e5543ad6.1253272938.git.quintela@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Sep 18, 2009 at 01:41:34PM +0200, Juan Quintela wrote: > Code compile with --disable-cpu-emulation, and that don't compile > tcg. This is the minimal set of changes to get it working Better see this upstreamed (and perhaps remove support from qemu-kvm, unless someone disagrees). > Signed-off-by: Juan Quintela > --- > Makefile.target | 6 ++++-- > configure | 6 ++++-- > exec.c | 2 ++ > target-i386/fake-exec.c | 4 ---- > vl.c | 2 +- > 5 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/Makefile.target b/Makefile.target > index 4a5352b..6846451 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -33,8 +33,10 @@ all: $(PROGS) > > ######################################################### > # cpu emulator library > -libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o > -libobj-y += tcg/tcg.o tcg/tcg-runtime.o > +libobj-y = exec.o cpu-exec.o host-utils.o > +libobj-$(CONFIG_NO_CPU_EMULATION) += fake-exec.o > +libobj-$(CONFIG_CPU_EMULATION) += translate-all.o translate.o > +libobj-$(CONFIG_CPU_EMULATION) += tcg/tcg.o tcg/tcg-runtime.o > libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o > libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o > libobj-y += op_helper.o helper.o > diff --git a/configure b/configure > index 289459a..ee37ea1 100755 > --- a/configure > +++ b/configure > @@ -2078,8 +2078,10 @@ fi > if test "$need_offsetof" = "yes" ; then > echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak > fi > -if test $cpu_emulation = "no"; then > - echo "NO_CPU_EMULATION=1" >> $config_host_mak > +if test $cpu_emulation = "yes"; then > + echo "CONFIG_CPU_EMULATION=y" >> $config_host_mak > +else > + echo "CONFIG_NO_CPU_EMULATION=y" >> $config_host_mak > fi > > # XXX: suppress that > diff --git a/exec.c b/exec.c > index dd8881c..aff9ec8 100644 > --- a/exec.c > +++ b/exec.c > @@ -3795,7 +3795,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); > +#ifdef CONFIG_PROFILER > tcg_dump_info(f, cpu_fprintf); > +#endif > } > > #if !defined(CONFIG_USER_ONLY) > diff --git a/target-i386/fake-exec.c b/target-i386/fake-exec.c > index 737286d..dfa202d 100644 > --- a/target-i386/fake-exec.c > +++ b/target-i386/fake-exec.c > @@ -45,10 +45,6 @@ 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/vl.c b/vl.c > index 88bd3eb..5d4e18f 100644 > --- a/vl.c > +++ b/vl.c > @@ -5627,7 +5627,7 @@ int main(int argc, char **argv, char **envp) > > ret = kvm_init(smp_cpus); > if (ret < 0) { > -#if defined(KVM_UPSTREAM) || defined(NO_CPU_EMULATION) > +#if defined(KVM_UPSTREAM) || defined(CONFIG_NO_CPU_EMULATION) > fprintf(stderr, "failed to initialize KVM\n"); > exit(1); > #endif > -- > 1.6.2.5 > > -- > 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