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] svm: use msr safe for erratum 383

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] svm: use msr safe for erratum 383
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 11 Jun 2010 07:25:24 -0700
Delivery-date: Fri, 11 Jun 2010 07:27:32 -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 1276261072 -3600
# Node ID f086edac7f92caacf33476d6b5fe00ae124df299
# Parent  8f342d84db4b9122af77c6591f8a769833c08be5
svm: use msr safe for erratum 383

Make erratum 383 use msr safe variants to work on top of KVM.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff -r 8f342d84db4b -r f086edac7f92 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Fri Jun 11 12:35:47 2010 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Fri Jun 11 13:57:52 2010 +0100
@@ -849,10 +849,14 @@ static void svm_init_erratum_383(struct 
     if ( c->x86 != 0x10 )
         return;
 
-    rdmsrl(MSR_AMD64_DC_CFG, msr_content);
-    wrmsrl(MSR_AMD64_DC_CFG, msr_content | (1ULL << 47));
-
-    amd_erratum383_found = 1;
+    /* use safe methods to be compatible with nested virtualization */
+    if (rdmsr_safe(MSR_AMD64_DC_CFG, msr_content) == 0 &&
+        wrmsr_safe(MSR_AMD64_DC_CFG, msr_content | (1ULL << 47)) == 0)
+    {
+        amd_erratum383_found = 1;
+    } else {
+        printk("Failed to enable erratum 383\n");
+    }
 }
 
 static int svm_cpu_up(void)

_______________________________________________
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] svm: use msr safe for erratum 383, Xen patchbot-unstable <=