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

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


  • To: Jan Beulich <JBeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Wed, 09 Jul 2014 11:02:01 +0300
  • Cc: tim@xxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Wed, 09 Jul 2014 08:01:34 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=PByhsRXA5OHbV908hNsOkHL6EMQtPvZkcm3g3T6RHzH5MpmpHhaY1rmErpRscMm5F7pmVNYDGEpGoLaX7/vIlDEz9vpYbEsTp9aMe4nzWnFJyPAKEtqKh7txiQ2fDPN77PxR1r1Fc+/xRwYhj3YKsOYqu5W8vEr+IyFQAr8lmTsSzBPY9rkKlHNs649FaLgU/PLFcoTpKV1FJUqpjeJ/b2TgFVeUQZ2tpqa/0/x1W4z3bpPxinX6JNXaLn0ZQNTNVjjV59pt/wHn9fTp/pRuNDTS7jfQcB/0xP5msPCERZUSmjbiMx9qRpMaaGjhTR6dy6AOOWY5y+rWXGvka10QLg==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 07/02/2014 06:43 PM, Jan Beulich wrote:
>>>> On 02.07.14 at 17:35, <andrew.cooper3@xxxxxxxxxx> 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.

Unfortunately the call to vmx_disable_intercept_for_msr() happens _very_
early, and by the time our application gets to enable mem_access on the
domain, the interception for these MSRs has already been disabled, with
unacceptable consequences.

I've tested this with an "if (
mem_event_check_ring(&d->mem_event->access) )" test.

Also, ideally we'd like to be able to start monitoring an already
started domain, and in that case the mem_access test would be useless
even considering a workaround for the case above.


Thanks,
Razvan Cojocaru

_______________________________________________
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®.