From: Christoph Egger Subject: [PATCH] xen: PAT support on AMD Date: Wed, 12 Aug 2009 10:54:41 +0200 Message-ID: <200908121054.41698.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_RNogKA35645rt4I" 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 --Boundary-00=_RNogKA35645rt4I Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch adds PAT support on AMD CPUs. Signed-off-by: Christoph Egger Keir: Please apply this to Xen-3.4-testing and Xen-3.3-testing, too. -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_RNogKA35645rt4I Content-Type: text/x-diff; charset="us-ascii"; name="xen_pat.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_pat.diff" diff -r 57033bc8cd30 xen/arch/x86/hvm/svm/vmcb.c --- a/xen/arch/x86/hvm/svm/vmcb.c Fri Aug 07 17:31:27 2009 +0100 +++ b/xen/arch/x86/hvm/svm/vmcb.c Mon Aug 10 10:20:03 2009 +0200 @@ -155,6 +155,7 @@ static int construct_vmcb(struct vcpu *v svm_disable_intercept_for_msr(v, MSR_LSTAR); svm_disable_intercept_for_msr(v, MSR_STAR); svm_disable_intercept_for_msr(v, MSR_SYSCALL_MASK); + svm_disable_intercept_for_msr(v, MSR_IA32_CR_PAT); vmcb->msrpm_base_pa = (u64)virt_to_maddr(arch_svm->msrpm); vmcb->iopm_base_pa = (u64)virt_to_maddr(hvm_io_bitmap); @@ -247,6 +250,8 @@ static int construct_vmcb(struct vcpu *v else { vmcb->exception_intercepts |= (1U << TRAP_page_fault); + if ( cpu_has_pat ) + svm_enable_intercept_for_msr(v, MSR_IA32_CR_PAT); } if ( cpu_has_pause_filter ) --Boundary-00=_RNogKA35645rt4I 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 --Boundary-00=_RNogKA35645rt4I--