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-devel

[Xen-devel] [PATCH] MSR related clean up

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] MSR related clean up
From: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Date: Thu, 18 Jun 2009 17:57:06 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Eddie Dong <eddie.dong@xxxxxxxxx>, Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Delivery-date: Thu, 18 Jun 2009 02:58:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
rdmsr_safe() is used to access MSR unknown to Xen, and is not safe... I think
it is legacy.

Also let msr_write be parity with msr_read on MSR_IA32_MISC_ENABLE.

CC: Eddie Dong <eddie.dong@xxxxxxxxx>
Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx>

diff -r c30742011bb8 -r 64dc4510484e xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Mar 12 18:48:09 2009 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu Jun 18 17:10:22 2009 +0800
@@ -1836,8 +1836,7 @@
         }
 
         if ( rdmsr_viridian_regs(ecx, &eax, &edx) ||
-             rdmsr_hypervisor_regs(ecx, &eax, &edx) ||
-             rdmsr_safe(ecx, eax, edx) == 0 )
+             rdmsr_hypervisor_regs(ecx, &eax, &edx) )
         {
             regs->eax = eax;
             regs->edx = edx;
@@ -2008,6 +2007,9 @@
     }
     case MSR_IA32_VMX_BASIC...MSR_IA32_VMX_PROCBASED_CTLS2:
         goto gp_fault;
+    /* Ignore writing to these MSRs */
+    case MSR_IA32_MISC_ENABLE:
+        break;
     default:
         if ( vpmu_do_wrmsr(regs) )
             return X86EMUL_OKAY;

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