From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 8/9] allow read access to MSR_VM_VR Date: Fri, 31 Oct 2008 11:57:32 +0100 Message-ID: <20081031105732.GB26275@8bytes.org> References: <1224522290-11740-1-git-send-email-agraf@suse.de> <1224522290-11740-2-git-send-email-agraf@suse.de> <1224522290-11740-3-git-send-email-agraf@suse.de> <1224522290-11740-4-git-send-email-agraf@suse.de> <1224522290-11740-5-git-send-email-agraf@suse.de> <1224522290-11740-6-git-send-email-agraf@suse.de> <1224522290-11740-7-git-send-email-agraf@suse.de> <1224522290-11740-8-git-send-email-agraf@suse.de> <1224522290-11740-9-git-send-email-agraf@suse.de> <490A07CB.70206@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , kvm@vger.kernel.org, avi@redhat.com, Joerg Roedel To: Anthony Liguori Return-path: Received: from 8bytes.org ([88.198.83.132]:43241 "EHLO 8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbYJaK5e (ORCPT ); Fri, 31 Oct 2008 06:57:34 -0400 Content-Disposition: inline In-Reply-To: <490A07CB.70206@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Oct 30, 2008 at 02:15:23PM -0500, Anthony Liguori wrote: > Alexander Graf wrote: > >From: Joerg Roedel > > > >KVM tries to read the VM_CR MSR to find out if SVM was disabled by > >the BIOS. So implement read support for this MSR to make nested > >SVM running. > > > >Signed-off-by: Joerg Roedel > >Signed-off-by: Alexander Graf > >--- > > arch/x86/kvm/svm.c | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > >diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > >index 720b610..4582699 100644 > >--- a/arch/x86/kvm/svm.c > >+++ b/arch/x86/kvm/svm.c > >@@ -1869,6 +1869,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, > >unsigned ecx, u64 *data) > > case MSR_VM_HSAVE_PA: > > *data = 0; > > break; > >+ case MSR_VM_CR: > >+ *data = 0; > >+ break; > > > > It would be useful to support setting this value too. Then we could > disable SVM support by writing the MSR in the BIOS. Things are a bit more complicated here. On real hardware you can't disable SVM by writing so VM_CR. You have to implement the SVM_KEY MSR for that. But that should not be too difficult. Joerg