All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	eddie.dong@intel.com, xen-devel@lists.xen.org,
	jun.nakajima@intel.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC V6 3/5] xen, libxc: Force-enable relevant MSR events
Date: Tue, 12 Aug 2014 18:09:50 +0300	[thread overview]
Message-ID: <53EA2E3E.5050503@bitdefender.com> (raw)
In-Reply-To: <53EA4989020000780002BB4C@mail.emea.novell.com>

On 08/12/2014 06:06 PM, Jan Beulich wrote:
>>>> On 11.08.14 at 17:08, <rcojocaru@bitdefender.com> wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmcs.c
>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
>> @@ -39,6 +39,7 @@
>>  #include <xen/keyhandler.h>
>>  #include <asm/shadow.h>
>>  #include <asm/tboot.h>
>> +#include <asm/mem_event.h>
>>  
>>  static bool_t __read_mostly opt_vpid_enabled = 1;
>>  boolean_param("vpid", opt_vpid_enabled);
>> @@ -695,11 +696,31 @@ static void vmx_set_host_env(struct vcpu *v)
>>  void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr, int type)
>>  {
>>      unsigned long *msr_bitmap = v->arch.hvm_vmx.msr_bitmap;
>> +    struct domain *d = v->domain;
>>  
>>      /* VMX MSR bitmap supported? */
>>      if ( msr_bitmap == NULL )
>>          return;
>>  
>> +    if ( mem_event_check_ring(&d->mem_event->access) &&
>> +         d->arch.hvm_domain.introspection_enabled )
>> +    {
>> +        /* 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:
>> +            return;
> 
> So you're adding an array further down, but just to use it there? My
> main point in asking for something like that was to have a _single_
> place where all the relevant MSRs get enumerated.

You're right, I'll change the code (and modify it to address the rest of
your comments as well).


Thanks,
Razvan Cojocaru

  reply	other threads:[~2014-08-12 15:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 15:08 [PATCH RFC V6 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-08-11 15:08 ` [PATCH RFC V6 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-08-12 15:01   ` Jan Beulich
2014-08-11 15:08 ` [PATCH RFC V6 3/5] xen, libxc: Force-enable relevant MSR events Razvan Cojocaru
2014-08-12 15:06   ` Jan Beulich
2014-08-12 15:09     ` Razvan Cojocaru [this message]
2014-08-11 15:08 ` [PATCH RFC V6 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-08-12 15:16   ` Jan Beulich
2014-08-12 15:42     ` Razvan Cojocaru
2014-08-12 16:03       ` Jan Beulich
2014-08-11 15:08 ` [PATCH RFC V6 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-08-12 15:20   ` Jan Beulich
2014-08-12 15:43     ` Razvan Cojocaru
2014-08-12 14:57 ` [PATCH RFC V6 1/5] xen: Emulate with no writes Jan Beulich
2014-08-12 15:08   ` Razvan Cojocaru
2014-08-12 15:27     ` Jan Beulich
2014-08-12 15:49       ` Razvan Cojocaru

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=53EA2E3E.5050503@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.