Re: [Xen-devel] [PATCH v3 1/4] asm-x86/monitor: Fix monitor capability reporting on SVM systems

2018-02-14 Thread Tamas K Lengyel
On Wed, Feb 14, 2018 at 10:56 AM, Razvan Cojocaru
 wrote:
> On 02/14/2018 07:47 PM, Andrew Cooper wrote:
>> On 12/02/18 15:13, Andrew Cooper wrote:
>>> On 12/02/18 15:08, Alexandru Isaila wrote:
 No monitor features are available on AMD and all
 capabilities are passed only to the Intel processor architecture.
 This means that the arch_monitor_get_capabilities returns
 capabilities = 0.

 This patch is separating out features which are implemented on both
 systems from those implemented only on Intel, so that we advertize the
 working capabilities on AMD.

 Signed-off-by: Alexandru Isaila 
>>
>> This patch still needs an ack from Tamas or Razvan, but there is no
>> comment so far that I can find.
>
> I think Tamas probably wouldn't object, so FWIW:
>
> Acked-by: Razvan Cojocaru 

Yes, this looks fine to me too:

Acked-by: Tamas K Lengyel 

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

Re: [Xen-devel] [PATCH v3 1/4] asm-x86/monitor: Fix monitor capability reporting on SVM systems

2018-02-14 Thread Razvan Cojocaru
On 02/14/2018 07:47 PM, Andrew Cooper wrote:
> On 12/02/18 15:13, Andrew Cooper wrote:
>> On 12/02/18 15:08, Alexandru Isaila wrote:
>>> No monitor features are available on AMD and all
>>> capabilities are passed only to the Intel processor architecture.
>>> This means that the arch_monitor_get_capabilities returns
>>> capabilities = 0.
>>>
>>> This patch is separating out features which are implemented on both
>>> systems from those implemented only on Intel, so that we advertize the
>>> working capabilities on AMD.
>>>
>>> Signed-off-by: Alexandru Isaila 
> 
> This patch still needs an ack from Tamas or Razvan, but there is no
> comment so far that I can find.

I think Tamas probably wouldn't object, so FWIW:

Acked-by: Razvan Cojocaru 


Thanks,
Razvan

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

Re: [Xen-devel] [PATCH v3 1/4] asm-x86/monitor: Fix monitor capability reporting on SVM systems

2018-02-14 Thread Andrew Cooper
On 12/02/18 15:13, Andrew Cooper wrote:
> On 12/02/18 15:08, Alexandru Isaila wrote:
>> No monitor features are available on AMD and all
>> capabilities are passed only to the Intel processor architecture.
>> This means that the arch_monitor_get_capabilities returns
>> capabilities = 0.
>>
>> This patch is separating out features which are implemented on both
>> systems from those implemented only on Intel, so that we advertize the
>> working capabilities on AMD.
>>
>> Signed-off-by: Alexandru Isaila 

This patch still needs an ack from Tamas or Razvan, but there is no
comment so far that I can find.

~Andrew


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

Re: [Xen-devel] [PATCH v3 1/4] asm-x86/monitor: Fix monitor capability reporting on SVM systems

2018-02-12 Thread Andrew Cooper
On 12/02/18 15:08, Alexandru Isaila wrote:
> No monitor features are available on AMD and all
> capabilities are passed only to the Intel processor architecture.
> This means that the arch_monitor_get_capabilities returns
> capabilities = 0.
>
> This patch is separating out features which are implemented on both
> systems from those implemented only on Intel, so that we advertize the
> working capabilities on AMD.
>
> Signed-off-by: Alexandru Isaila 
>
> ---
> Changes since V2:
>   - Moved the common part of capabilities after the
> !is_hvm_domain(d) test
>   - Modified the comment in arch_monitor_get_capabilities
> ---
>  xen/include/asm-x86/monitor.h | 34 +++---
>  1 file changed, 19 insertions(+), 15 deletions(-)
>
> diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h
> index a0444d1..c339324 100644
> --- a/xen/include/asm-x86/monitor.h
> +++ b/xen/include/asm-x86/monitor.h
> @@ -71,24 +71,28 @@ static inline uint32_t 
> arch_monitor_get_capabilities(struct domain *d)
>  uint32_t capabilities = 0;
>  
>  /*
> - * At the moment only Intel HVM domains are supported. However, event
> - * delivery could be extended to AMD and PV domains.
> + * At the moment only Intel and AMD HVM domains are supported. However, 
> event
> + * delivery could be extended to PV domains.
>   */
> -if ( !is_hvm_domain(d) || !cpu_has_vmx )
> +if ( !is_hvm_domain(d) )
>  return capabilities;
>  
> -capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_DEBUG_EXCEPTION) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_CPUID) |
> -   (1U << XEN_DOMCTL_MONITOR_EVENT_INTERRUPT) |
> -   (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);
> +capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
> +
> +if( cpu_has_vmx )

Missing space.

> +{
> +capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_DEBUG_EXCEPTION) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_CPUID) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_INTERRUPT) |
> +   (1U << XEN_DOMCTL_MONITOR_EVENT_EMUL_UNIMPLEMENTED);

With an extra set of brackes around the entire expression, editors will
indent this properly.

I can fix these issues on commit if there are no other objections. 
Acked-by: Andrew Cooper 

> +
> +/* 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);
> +}
>  
>  if ( hvm_funcs.set_descriptor_access_exiting )
>  capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_DESC_ACCESS);


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