From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiCex-0004d9-VR for qemu-devel@nongnu.org; Mon, 10 Dec 2012 18:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiCew-0006na-QB for qemu-devel@nongnu.org; Mon, 10 Dec 2012 18:21:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48905 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiCew-0006nR-Jk for qemu-devel@nongnu.org; Mon, 10 Dec 2012 18:21:14 -0500 Message-ID: <50C66E66.4030606@suse.de> Date: Tue, 11 Dec 2012 00:21:10 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1354645978-17362-1-git-send-email-ehabkost@redhat.com> <1355082353-322-1-git-send-email-afaerber@suse.de> <1355082353-322-2-git-send-email-afaerber@suse.de> <20121210124613.GI4255@otherpad.lan.raisama.net> <20121210195542.3e1e1d9f@thinkpad.mammed.net> In-Reply-To: <20121210195542.3e1e1d9f@thinkpad.mammed.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/4] target-i386: Inline -cpu host check into cpu_x86_register() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: blauwirbel@gmail.com, Eduardo Habkost , qemu-devel@nongnu.org Am 10.12.2012 19:55, schrieb Igor Mammedov: > On Mon, 10 Dec 2012 10:46:13 -0200 > Eduardo Habkost wrote: >=20 >> On Sun, Dec 09, 2012 at 08:45:50PM +0100, Andreas F=C3=A4rber wrote: >>> Simplifies the upcoming cleanup of cpu_x86_find_by_name(). >> >> ...by making cpu_x86_register() more complicated, and having CPU model >> name lookup spread into different parts of the code. >> >> The CPU model lookup is a bit complex because of the "host" exception, >> but at least the complexity was hidden inside cpu_x86_find_by_name() >> (making it very easy to replace that logic by a CPU subclass lookup, >> later). (Somehow I didn't get this message ... yet) > +1 Could you guys re-review this in light of the subclasses patch? The issue I was facing is that I did not see a reliable way to register the host class depending on kvm_enabled(). Therefore ..._find_by_name() becomes the class lookup whereas the host check remains a special check in cpu_x86_init() [a faulty one I now see, ignoring "host-x86_64-cpu"]. cpu_x86_register() is problematic in that it gets the X86CPU served on a silver plate, so it's too late to choose subclasses in that function. Andreas >=20 > [...] >> >> --=20 >> Eduardo >> >=20 >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg