WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: replace PAT initialisation magic val

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: replace PAT initialisation magic value with a #define
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Aug 2009 07:45:16 -0700
Delivery-date: Wed, 12 Aug 2009 07:45:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249662633 -3600
# Node ID 5998795faa6e4f7d5128e231b6ed5a5849f638db
# Parent  1197585e32b73b052a1f04b1bacd464465c269cc
x86: replace PAT initialisation magic value with a #define

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c      |    2 +-
 xen/arch/x86/hvm/svm/vmcb.c     |    2 +-
 xen/arch/x86/hvm/vmx/vmcs.c     |    2 +-
 xen/include/asm-x86/msr-index.h |    1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff -r 1197585e32b7 -r 5998795faa6e xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Fri Aug 07 17:29:50 2009 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Fri Aug 07 17:30:33 2009 +0100
@@ -266,7 +266,7 @@ static int svm_vmcb_restore(struct vcpu 
     if ( paging_mode_hap(v->domain) )
     {
         vmcb->np_enable = 1;
-        vmcb->g_pat = 0x0007040600070406ULL; /* guest PAT */
+        vmcb->g_pat = MSR_IA32_CR_PAT_RESET; /* guest PAT */
         vmcb->h_cr3 = pagetable_get_paddr(v->domain->arch.phys_table);
     }
 
diff -r 1197585e32b7 -r 5998795faa6e xen/arch/x86/hvm/svm/vmcb.c
--- a/xen/arch/x86/hvm/svm/vmcb.c       Fri Aug 07 17:29:50 2009 +0100
+++ b/xen/arch/x86/hvm/svm/vmcb.c       Fri Aug 07 17:30:33 2009 +0100
@@ -232,7 +232,7 @@ static int construct_vmcb(struct vcpu *v
     if ( paging_mode_hap(v->domain) )
     {
         vmcb->np_enable = 1; /* enable nested paging */
-        vmcb->g_pat = 0x0007040600070406ULL; /* guest PAT */
+        vmcb->g_pat = MSR_IA32_CR_PAT_RESET; /* guest PAT */
         vmcb->h_cr3 = pagetable_get_paddr(v->domain->arch.phys_table);
 
         /* No point in intercepting CR3 reads/writes. */
diff -r 1197585e32b7 -r 5998795faa6e xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Fri Aug 07 17:29:50 2009 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Fri Aug 07 17:30:33 2009 +0100
@@ -743,7 +743,7 @@ static int construct_vmcs(struct vcpu *v
         u64 host_pat, guest_pat;
 
         rdmsrl(MSR_IA32_CR_PAT, host_pat);
-        guest_pat = 0x7040600070406ULL;
+        guest_pat = MSR_IA32_CR_PAT_RESET;
 
         __vmwrite(HOST_PAT, host_pat);
         __vmwrite(GUEST_PAT, guest_pat);
diff -r 1197585e32b7 -r 5998795faa6e xen/include/asm-x86/msr-index.h
--- a/xen/include/asm-x86/msr-index.h   Fri Aug 07 17:29:50 2009 +0100
+++ b/xen/include/asm-x86/msr-index.h   Fri Aug 07 17:30:33 2009 +0100
@@ -87,6 +87,7 @@
 #define MSR_IA32_MTRR_PHYSMASK7     0x0000020f
 
 #define MSR_IA32_CR_PAT             0x00000277
+#define MSR_IA32_CR_PAT_RESET       0x0007040600070406ULL
 
 #define MSR_IA32_MC0_CTL               0x00000400
 #define MSR_IA32_MC0_STATUS            0x00000401

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: replace PAT initialisation magic value with a #define, Xen patchbot-unstable <=