From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPDCR-0004sK-GC for qemu-devel@nongnu.org; Mon, 08 Apr 2013 10:37:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPDCL-0005bP-Rb for qemu-devel@nongnu.org; Mon, 08 Apr 2013 10:37:35 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34394 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPDCL-0005PW-Lu for qemu-devel@nongnu.org; Mon, 08 Apr 2013 10:37:29 -0400 Message-ID: <5162D5FF.8040800@suse.de> Date: Mon, 08 Apr 2013 16:36:47 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1363984637-18132-1-git-send-email-pbonzini@redhat.com> <1363984637-18132-2-git-send-email-pbonzini@redhat.com> <20130402132932.GF3889@redhat.com> <20130408121950.GA9425@redhat.com> In-Reply-To: <20130408121950.GA9425@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov , Paolo Bonzini Cc: Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org, Alexander Graf Am 08.04.2013 14:19, schrieb Gleb Natapov: > On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote: >>> static void kvm_sw_tlb_put(PowerPCCPU *cpu) >>> { >>> CPUPPCState *env =3D &cpu->env; >>> diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c >>> index 23fe51f..6321384 100644 >>> --- a/target-s390x/cpu.c >>> +++ b/target-s390x/cpu.c >>> @@ -84,6 +84,10 @@ static void s390_cpu_reset(CPUState *s) >>> * after incrementing the cpu counter */ >>> #if !defined(CONFIG_USER_ONLY) >>> s->halted =3D 1; >>> + >>> + if (kvm_enabled()) { >>> + kvm_arch_reset_vcpu(s); >> Does this compile with kvm support disabled? >> > Well, it does not: > CC s390x-softmmu/target-s390x/cpu.o > /users/gleb/work/qemu/target-s390x/cpu.c: In function 's390_cpu_reset': > /users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: implicit > declaration of function 'kvm_arch_reset_vcpu' > [-Werror=3Dimplicit-function-declaration] > /users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: nested extern > declaration of 'kvm_arch_reset_vcpu' [-Werror=3Dnested-externs] > cc1: all warnings being treated as errors >=20 > I wonder if it is portable between compilers to rely on code in if(0){}= to > be dropped in all levels of optimizations. No, we had a previous case where --enable-debug broke if (kvm_enabled()) {...} but regular builds worked. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg