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

Re: [Xen-devel] [PATCH 1/8] x86/vm-event: proper vCPU-paused checks at resume



On 06/30/16 21:41, Corneliu ZUZU wrote:
> A VM_EVENT_FLAG_VCPU_PAUSED flag in a vm-event response should only be treated
> as informative that the toolstack user wants the vm-event subsystem to unpause
> the target vCPU, but not be relied upon to decide if the target vCPU is 
> actually
> paused.
> 
> That being said, this patch does the following:
> 
> * Fixes (replaces) the old behavior in vm_event_resume, which relied on
>   VM_EVENT_FLAG_VCPU_PAUSED to determine if the target vCPU is paused, by
>   actually checking the vCPU vm-event pause-count.
> 
> * ASSERTs that the vCPU is paused in vm_event_set_registers and
>   vm_event_toggle_singlestep.
> 
> * Ignores VM_EVENT_FLAG_DENY @ vm_event_register_write_resume if the target 
> vCPU
>   is not paused. Also adjusts comment in public/vm_event.h to reflect that.
> 
> Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/vm_event.c       | 10 +++++++++-
>  xen/common/vm_event.c         |  6 ++++--
>  xen/include/public/vm_event.h |  1 +
>  3 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c
> index a9d3861..80f84d6 100644
> --- a/xen/arch/x86/vm_event.c
> +++ b/xen/arch/x86/vm_event.c
> @@ -61,9 +61,11 @@ void vm_event_cleanup_domain(struct domain *d)
>  
>  void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v)
>  {
> -    if ( !is_hvm_domain(d) || !atomic_read(&v->vm_event_pause_count) )
> +    if ( !is_hvm_domain(d) )
>          return;
>  
> +    ASSERT(atomic_read(&v->vm_event_pause_count));
> +
>      hvm_toggle_singlestep(v);
>  }

I'd like for us to have Tamas' ack on the above change. Based on that:

Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>


Thanks,
Razvan

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