From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] nestedsvm: fix HSAVE_PA MSR Date: Tue, 11 Oct 2011 15:57:33 +0200 Message-ID: <4E944B4D.3060704@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080100090603060100050809" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --------------080100090603060100050809 Content-Type: text/plain; charset="ISO-8859-15"; format=flowed Content-Transfer-Encoding: 7bit Accessing HSAVE_PA MSR does not require SVM to be enabled nor any special guest paging mode. But accessing HSAVE_PA MSR requires the address to be 4k aligned. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --------------080100090603060100050809 Content-Type: text/plain; name="xen_hsavepa.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_hsavepa.diff" Content-Description: xen_hsavepa.diff diff -r a1fcb77b2ccb xen/arch/x86/hvm/svm/nestedsvm.c --- a/xen/arch/x86/hvm/svm/nestedsvm.c Fri Sep 09 10:22:40 2011 +0200 +++ b/xen/arch/x86/hvm/svm/nestedsvm.c Tue Oct 11 15:56:44 2011 +0200 @@ -51,7 +51,8 @@ nestedsvm_vcpu_stgi(struct vcpu *v) static int nestedsvm_vmcb_isvalid(struct vcpu *v, uint64_t vmcxaddr) { - if ( !hvm_svm_enabled(v) || hvm_guest_x86_mode(v) < 2 ) + /* Address must be 4k aligned */ + if ( (vmcxaddr & ~PAGE_MASK) != 0 ) return 0; /* Maximum valid physical address. --------------080100090603060100050809 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080100090603060100050809--