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

Re: [Xen-devel] [PATCH v1 2/2] hvm/svm: Enable EMUL_UNIMPLEMENTED events on svm



>>> On 11.05.18 at 13:11, <aisaila@xxxxxxxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/monitor.h
> +++ b/xen/include/asm-x86/monitor.h
> @@ -83,16 +83,13 @@ static inline uint32_t 
> arch_monitor_get_capabilities(struct domain *d)
>                      (1U << XEN_DOMCTL_MONITOR_EVENT_INTERRUPT) |
>                      (1U << XEN_DOMCTL_MONITOR_EVENT_CPUID) |
>                      (1U << XEN_DOMCTL_MONITOR_EVENT_DEBUG_EXCEPTION) |
> -                    (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG));
> +                    (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
> +                    (1U << XEN_DOMCTL_MONITOR_EVENT_EMUL_UNIMPLEMENTED));
>  
> -    if ( cpu_has_vmx )
> -    {
> -        capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_EMUL_UNIMPLEMENTED);
>  
> -        /* Since we know this is on VMX, we can just call the hvm func */
> -        if ( hvm_is_singlestep_supported() )
> -            capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
> -    }
> +     /* Check if we are on VMX and then we can just call the hvm func */
> +    if ( cpu_has_vmx && hvm_is_singlestep_supported() )
> +        capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);

I was about to apply this when I noticed the seemingly unnecessary
cpu_has_vmx here: hvm_is_singlestep_supported() is precisely the
abstraction to make such extra checking unnecessary. If you agree,
I can drop it while applying.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.