From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Latest qemu tcg breakage Date: Mon, 09 Jun 2008 19:15:05 +0300 Message-ID: <484D5709.4000900@qumranet.com> References: <1213019621.6792.7.camel@thinkpadL> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm , kvm-ppc-devel To: jyoung5@us.ibm.com Return-path: Received: from il.qumranet.com ([212.179.150.194]:15001 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbYFIQO7 (ORCPT ); Mon, 9 Jun 2008 12:14:59 -0400 In-Reply-To: <1213019621.6792.7.camel@thinkpadL> Sender: kvm-owner@vger.kernel.org List-ID: 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 > @@ -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.