From: "Jan Beulich" Subject: Re: [PATCH RFC 3/9] xen: Force-enable relevant MSR events; optimize the number of sent MSR events Date: Wed, 02 Jul 2014 16:43:43 +0100 Message-ID: <53B444CF020000780001FB22@mail.emea.novell.com> References: <1404308041-15461-1-git-send-email-rcojocaru@bitdefender.com> <1404308041-15461-3-git-send-email-rcojocaru@bitdefender.com> <53B426CE.6070400@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B426CE.6070400@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru , Andrew Cooper , xen-devel@lists.xen.org Cc: tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 02.07.14 at 17:35, wrote: > On 02/07/14 14:33, Razvan Cojocaru wrote: >> @@ -700,6 +700,25 @@ void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr, int type) >> if ( msr_bitmap == NULL ) >> return; >> >> + /* Filter out MSR-s needed by the memory introspection engine */ >> + 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: >> + > > Given the performance implications of forcing interception of these > MSRs, it would be gated on mem_access being active for the domain. Absolutely. >> + printk("Warning: cannot disable the interception of MSR " >> + "0x%08x because it is needed by the memory introspection " >> + "engine\n", msr); >> + return; > > gdprintk() please, and a rather shorter message. Not sure about gdprintk() - we neither need the file/line to be printed here, nor am I sure that v == current (or else the dom/vcpu printed would be wrong), but this should clearly be XENLOG_DEBUG and abbreviated as much as possible without making it meaningless. Jan