All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MSR related clean up
@ 2009-06-18  9:57 Sheng Yang
  2009-06-24  8:50 ` Sheng Yang
  0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2009-06-18  9:57 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Eddie Dong, Sheng Yang

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@intel.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>

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;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-06-24 13:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18  9:57 [PATCH] MSR related clean up Sheng Yang
2009-06-24  8:50 ` Sheng Yang
2009-06-24  9:03   ` Keir Fraser
2009-06-24  9:21     ` Sheng Yang
2009-06-24  9:27       ` Keir Fraser
2009-06-24  9:45         ` Dong, Eddie
2009-06-24 10:48           ` Keir Fraser
2009-06-24 13:41             ` Dong, Eddie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.