[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC V2 3/6] xen: Force-enable relevant MSR events; optimize the number of sent MSR events


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Fri, 11 Jul 2014 18:43:35 +0300
  • Cc: andrew.cooper3@xxxxxxxxxx, mdontu@xxxxxxxxxxxxxxx, tim@xxxxxxx, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, JBeulich@xxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Fri, 11 Jul 2014 15:43:57 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=2RKGSH8TG2Lm7h+e1h03e1Uf97gWGgsB947CR/DH1qnUMUFQE81AemLOUEMjSsBq0lSiadZ4rUmpnKSDmZGAxQshpTlvIsoi+/Har3JXL+sJxxKzDfhLwE1rT/I6F6TwoCKjAoQaXbAgQAkii2wU8ZXZqx5PGnREuFEi2NOfUk1bTJpVB/NhocaCCK1Q4pYgMzKTSm3xZTvnmsC8COUkd+FTWNwtzqD4na6YutUaKKOsBtsaT35z1A6zfRSslHCPTLhuzH5cnN6WotSYaRlpOBpSM6cUKGuwj/i17dYLaFSC2+XFrEFpkz22t9C7mQGHqaGwfp0YVYTvp6seRun9uw==; h=Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Vmx_disable_intercept_for_msr() will now refuse to disable interception of
MSRs needed for memory introspection. It is not possible to gate this on
mem_access being active for the domain, since by the time mem_access does
become active the interception for the interesting MSRs has already been
disabled (vmx_disable_intercept_for_msr() runs very early on).

Changes since V1:
 - Replaced printk() with gdprintk(XENLOG_DEBUG, ...).

Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 8ffc562..35fcfcc 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -700,6 +700,24 @@ void vmx_disable_intercept_for_msr(struct vcpu *v, u32 
msr, int type)
     if ( msr_bitmap == NULL )
         return;
 
+    /* Filter out MSR-s needed for memory introspection */
+    switch ( msr )
+    {
+    case MSR_IA32_SYSENTER_EIP:
+    case MSR_IA32_SYSENTER_ESP:
+    case MSR_IA32_SYSENTER_CS:
+    case MSR_IA32_MC0_CTL:
+    case MSR_STAR:
+    case MSR_LSTAR:
+
+        gdprintk(XENLOG_DEBUG, "MSR 0x%08x needed for "
+            "memory introspection, still intercepted\n", msr);
+        return;
+
+    default:
+        break;
+    }
+
     /*
      * See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals
      * have the write-low and read-high bitmap offsets the wrong way round.
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.