From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsbd0-0004Mh-Qc for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wsbcv-0007ny-8s for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:39:02 -0400 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:50533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsbcv-0007nk-42 for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:38:57 -0400 Received: by mail-qg0-f41.google.com with SMTP id j5so2164570qga.28 for ; Thu, 05 Jun 2014 10:38:56 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5390AB29.1050402@redhat.com> Date: Thu, 05 Jun 2014 19:38:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1401984741-26882-1-git-send-email-ehabkost@redhat.com> <539099B6.2090000@suse.de> <53909A41.1060800@redhat.com> <53909D79.1070609@suse.de> <53909E53.9050300@redhat.com> <53909E9C.6080009@suse.de> <20140605171715.GN17594@otherpad.lan.raisama.net> In-Reply-To: <20140605171715.GN17594@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Alexander Graf Cc: Michael Mueller , kvm@vger.kernel.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, Christian Borntraeger , "Gabriel L. Somlo" , Borislav Petkov , "Jason J. Herne" , =?ISO-8859-1?Q?Andreas_F=E4rber?= Il 05/06/2014 19:17, Eduardo Habkost ha scritto: > > If you don't want MONITOR/MWAIT you shouldn't be using a CPU model > containing MONITOR/MWAIT in the first place. If you use "-cpu > somethingWithMONITOR", that means you are already asking QEMU for a CPU > with MONITOR. If you were not getting MONITOR before using > allow-emulation, that means you were not using the "enforce" flag, which > you should be using, already. Except that many cpus don't work with enforce: $ /usr/libexec/qemu-kvm -cpu core2duo,enforce warning: host doesn't support requested feature: CPUID.01H:EDX.ds [bit 21] warning: host doesn't support requested feature: CPUID.01H:EDX.acpi [bit 22] warning: host doesn't support requested feature: CPUID.01H:EDX.ht [bit 28] warning: host doesn't support requested feature: CPUID.01H:EDX.tm [bit 29] warning: host doesn't support requested feature: CPUID.01H:EDX.pbe [bit 31] warning: host doesn't support requested feature: CPUID.01H:ECX.dtes64 [bit 2] warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3] warning: host doesn't support requested feature: CPUID.01H:ECX.ds_cpl [bit 4] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] warning: host doesn't support requested feature: CPUID.01H:ECX.est [bit 7] warning: host doesn't support requested feature: CPUID.01H:ECX.tm2 [bit 8] warning: host doesn't support requested feature: CPUID.01H:ECX.xtpr [bit 14] warning: host doesn't support requested feature: CPUID.01H:ECX.pdcm [bit 15] Like VMX above, some AMD models require nested SVM to be enabled: $ /usr/libexec/qemu-kvm -cpu phenom,enforce warning: host doesn't support requested feature: CPUID.01H:EDX.ht [bit 28] warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3] warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2] warning: host doesn't support requested feature: CPUID.8000000AH:EDX.npt [bit 0] warning: host doesn't support requested feature: CPUID.8000000AH:EDX.lbrv [bit 1] (actually, even with nested SVM, LBR virtualization is not supported in L2 guests) Testing some of the bits does not make sense, for example HT. Some others will never be supported (TM/TM2, ACPI, PBE, xTPR, ...). The set of CPUs that work with enforce is pretty much what you tested (the Opteron_G* models and some of the code-named Intel chips). Paolo