|
[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
On 07/23/2014 10:56 AM, Jan Beulich wrote:
>>>> On 09.07.14 at 10:02, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>> 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.
>
> All understood, but not penalizing non-monitored VMs has certainly
> higher priority.
Got it, I've already changed the code, but waiting on a few other things
before resubmitting the series. As far as this patch goes, the HV now
only refuses to disable interception for the interesting MSRs if
mem_access is active for the domain, and always enables interception for
them on XEN_DOMCTL_MEM_EVENT_OP_ACCESS in mem_event_domctl().
Thanks,
Razvan Cojocaru
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |