From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: Add svm cpuid features Date: Sat, 11 Sep 2010 16:36:34 +0200 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 Cc: Joerg Roedel , Avi Kivity , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from 8bytes.org ([88.198.83.132]:60713 "EHLO 8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194Ab0IKOgf (ORCPT ); Sat, 11 Sep 2010 10:36:35 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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