From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44305 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuRC1-0008KI-4r for qemu-devel@nongnu.org; Sat, 11 Sep 2010 10:36:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuRBz-00087m-QT for qemu-devel@nongnu.org; Sat, 11 Sep 2010 10:36:36 -0400 Received: from 8bytes.org ([88.198.83.132]:34722) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuRBz-00087e-Ha for qemu-devel@nongnu.org; Sat, 11 Sep 2010 10:36:35 -0400 Date: Sat, 11 Sep 2010 16:36:34 +0200 From: Joerg Roedel Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: Add svm cpuid features Message-ID: <20100911143634.GB680@8bytes.org> References: <1284133120-19453-1-git-send-email-joerg.roedel@amd.com> <1284133120-19453-3-git-send-email-joerg.roedel@amd.com> <20100911142018.GA680@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Joerg Roedel , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On Sat, Sep 11, 2010 at 04:29:18PM +0200, Alexander Graf wrote: > > Depends on which Phenom you have. A Phenom II has NRIPSAVE but the old > > Phenoms don't have it. For the SVM features it is not that important > > what the host hardware supports but what KVM can emulate. VMCBCLEAN can > > be emulated without supporting it in the host for example. > > That particular one was my workstation - a Phenom 9550 which is one of > the early 4-core ones. Yes, the 9550 don't have the nripsave feature. > > No, the default CPU type has SVM still enabled by default. I thought > > about removing the SVM flag from the qemu64 cpu definition but that > > breaks on TCG where SVM is emulated too. > > What I implemented in this patch is to enable SVM by default and mask it > > out if KVM does not support it on the given machine. Problem here is > > that KVM is currently buggy because it always reports support for SVM, > > even on Intel machines. I fixed that with patch 29 of my npt-virt > > patch-set. The patch will hopefully make it into the various stable > > trees and then we have a clean solution. > > It still won't be clean as it breaks cross vendor migration :(. The > real fix would be to set the default machine to "kvm64" instead of > "qemu64" in pc.c when kvm_enabled(). I am not sure that I am the right person to do such an invasive change. At least not in this patch-set. I could think of removing SVM from the qemu64 definition and add it again in the TCG specific path. Joerg