From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcDep-00028d-5v for qemu-devel@nongnu.org; Sun, 18 Dec 2011 05:07:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcDen-0006kr-TO for qemu-devel@nongnu.org; Sun, 18 Dec 2011 05:07:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcDen-0006kd-Ls for qemu-devel@nongnu.org; Sun, 18 Dec 2011 05:07:49 -0500 Message-ID: <4EEDBB68.6040204@redhat.com> Date: Sun, 18 Dec 2011 12:07:36 +0200 From: Dor Laor MIME-Version: 1.0 References: <20111215145415.GA265695@orkuz.home> <4EEA0B2F.9010402@codemonkey.ws> <20111215153052.GC4584@orkuz.home> In-Reply-To: <20111215153052.GC4584@orkuz.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Modern CPU models cannot be used with libvirt Reply-To: dlaor@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , libvir-list@redhat.com, qemu-devel@nongnu.org On 12/15/2011 05:30 PM, Jiri Denemark wrote: > On Thu, Dec 15, 2011 at 08:58:55 -0600, Anthony Liguori wrote: >> Pass '-readconfig /etc/qemu/target-x86_64.conf' to pick up those models and if >> you are absolutely insistent on not giving the user any ability to change things >> on their own, cp the file from qemu.git into libvirt.git and install it in a >> safe place. > > Ah, this looks like a good idea (and we could even generate that file > dynamically if we add support for family/stepping/... and other things that we > do not model now). However, separating these definitions from qemu may result > in incompatibilities with older qemu versions. I guess mainly because our > configuration file would mention a CPU feature that an installed qemu version > doesn't understand. Currently, qemu seems to just ignore such feature > (although it prints an error) and continues happily without it. Is there > any way for us to ask qemu what CPU features it knows about so that we could > avoid using a CPU models which include features qemu doesn't understand? Libvirt should use the 'enforce' option and there is also a 'check' one too: > qemu-kvm -cpu Conroe,+avx,enforce warning: host cpuid 0000_0001 lacks requested flag 'avx' [0x10000000] Unable to find x86 CPU definition Qemu supports backward compatibility of the command line and if libvirt stores additional cpuid related definitions it should still work on other qemu releases. btw: I do prompt the usage of the 'formal' cpu models as much as it can. If a user likes to toggle various options it should do it on top of our models. Regards, Dor > > Jirka >