From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0rgU-0000fM-54 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 07:20:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0rgT-0001hr-7L for qemu-devel@nongnu.org; Sun, 21 Jul 2013 07:20:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44849 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0rgT-0001hj-1U for qemu-devel@nongnu.org; Sun, 21 Jul 2013 07:20:13 -0400 Message-ID: <51EBC3E6.3000808@suse.de> Date: Sun, 21 Jul 2013 13:20:06 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1374404241-19600-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1374404241-19600-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] kvm: Combine all kvm stubs in a single file and compile it only once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Peter Maydell , Paolo Bonzini , qemu-devel , Alexander Graf Hi Stefan, Am 21.07.2013 12:57, schrieb Stefan Weil: > The KVM stub variables and functions don't depend on target specific da= ta > types, so it is possible to compile kvm-stub.c only once. >=20 > Integrating the target specific KVM stubs for ARM, I386 and PPC in the > common kvm-stub.c further simplifies the build environment and allows > removing CONFIG_NO_KVM. >=20 > Instead of 53 kvm-stub.o files, there is now only one file. >=20 > abort() is replaced by g_assert_not_reached() which gives better diagno= stic > messages when it is called. >=20 > Signed-off-by: Stefan Weil > --- >=20 > The resulting binary is slightly larger than before because it > includes more stub functions. It could be made smaller by adding > separate stubs/kvm-stub-arm.c, stubs/kvm-stub-i386.c and > stubs/kvm-stub-ppc.c files. Using alias symbols for the stub > functions would reduce the size further, but I don't think > the size is critical here. >=20 > Should we call g_assert_not_reached() in more (all?) stub functions? >=20 > If the patch is accepted, a similar modification could be done > for xen-stub.c. I had thought about turning kvm-stub.c into stubs/kvm.c but rejected that idea at the time due to CPU dependencies beyond CPUState. Also I was wondering whether all stubs are actually from kvm-all.c (fine then) or whether we would be opening a door for silently forgetting to implement some functions in a new KVM target such as MIPS. In the current form I think it's a gross hack wrt target_ulong and HW_POISON_H. ;) And yes, I would prefer to keep target stubs in separate files. Regards, 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