Received: from eggs.gnu.org ([208.118.235.92]:34404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBV8U-0002Ed-LD for qemu-devel@nongnu.org; Fri, 01 Mar 2013 13:56:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBV8T-0002n9-0c for qemu-devel@nongnu.org; Fri, 01 Mar 2013 13:56:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBV8S-0002my-Mq for qemu-devel@nongnu.org; Fri, 01 Mar 2013 13:56:48 -0500 Date: Fri, 1 Mar 2013 15:58:18 -0300 From: Eduardo Habkost Message-ID: <20130301185818.GY8494@otherpad.lan.raisama.net> References: <20130221145818.GK16618@otherpad.lan.raisama.net> <20130301131238.GE3375700@orkuz.home> <5130F412.3040903@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5130F412.3040903@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: libvir-list@redhat.com, qemu-devel@nongnu.org, Alexander Graf , Igor Mammedov , Jiri Denemark , Luiz Capitulino On Fri, Mar 01, 2013 at 07:31:46PM +0100, Andreas F=E4rber wrote: > Am 01.03.2013 14:12, schrieb Jiri Denemark: > > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote: > >> =3D Listing CPU models =3D > >> > >> Requirement: libvirt needs to know which CPU models are available to= be used > >> with the "-cpu" option. > >> > >> Current problem: libvirt relies on help output parsing for that. >=20 > query-cpu-definitions is the QMP command to retrieve values compatible > with -cpu. >=20 > And if libvirt is not using it, I really don't understand why the work > of maintaining this crappy interface has been pushed onto us in the > first place? There is no reuse between -cpu ? and QMP implementations s= o > it's just extra work, there is no communicated or implemented way to > extend the arch_query_cpu_definitions() implementation to become more > usable for command line output implementation (e.g., associating a PVR > value with the model name for ppc) and, while we're at it, it uses > global functions plus a stub rather than a CPUState hook with a no-op > default implementation in qom/cpu.c... I have the same questions you have. :-) But my main complaint about query-cpu-definitions is not about the implementation: it's that the interface was introduced without taking into account the requirements of libvirt regarding CPU features. It was found to be not appropriate for what libvirt needs[1], but somehow it got applied anyway. [1] http://article.gmane.org/gmane.comp.emulators.qemu/164772 --=20 Eduardo