All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	Eddie Dong <eddie.dong@intel.com>,
	Sheng Yang <sheng@linux.intel.com>
Subject: [PATCH] MSR related clean up
Date: Thu, 18 Jun 2009 17:57:06 +0800	[thread overview]
Message-ID: <1245319026-28658-1-git-send-email-sheng@linux.intel.com> (raw)

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;

             reply	other threads:[~2009-06-18  9:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  9:57 Sheng Yang [this message]
2009-06-24  8:50 ` [PATCH] MSR related clean up 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245319026-28658-1-git-send-email-sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=eddie.dong@intel.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.