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

Re: [Xen-devel] [PATCH V10 for-4.5 3/4] xen, libxc: Force-enable relevant MSR events



On 09/18/2014 05:51 PM, Tamas K Lengyel wrote:
> 
>     diff --git a/xen/arch/x86/mm/mem_event.c b/xen/arch/x86/mm/mem_event.c
>     index ba7e71e..fdd5ff6 100644
>     --- a/xen/arch/x86/mm/mem_event.c
>     +++ b/xen/arch/x86/mm/mem_event.c
>     @@ -587,6 +587,7 @@ int mem_event_domctl(struct domain *d,
>     xen_domctl_mem_event_op_t *mec,
>              switch( mec->op )
>              {
>              case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE:
>     +        case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE_INTROSPECTION:
>              {
>                  rc = -ENODEV;
>                  /* Only HAP is supported */
>     @@ -600,13 +601,23 @@ int mem_event_domctl(struct domain *d,
>     xen_domctl_mem_event_op_t *mec,
>                  rc = mem_event_enable(d, mec, med, _VPF_mem_access,
>                                          HVM_PARAM_ACCESS_RING_PFN,
>                                          mem_access_notification);
>     +
>     +            if ( mec->op != XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE &&
>     +                 rc == 0 && hvm_funcs.enable_msr_exit_interception )
>     +            {
>     +                d->arch.hvm_domain.introspection_enabled = 1;
>     +                hvm_funcs.enable_msr_exit_interception(d);
>     +            }
> 
> 
> I guess I should have spoken up before this got merged, but it would
> have been better to keep x86 hvm specific code abstracted out here
> considering this function is being moved into common in my series and
> hvm_funcs are not defined for ARM.

It's fine by me if you decide to move the MSR-enabling code somewhere
else in one of your patches (I'm not sure where you'd prefer it to be) -
I would think that is trivial once you know where the code's being moved.

I'm not sure what the best solution would be at this point, if there are
other suggestions I'm listening.


Regards,
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®.