Re: [Xen-devel] [PATCH 2/2] common/vcpu: Switch v->vcpu_info_mfn to mfn_t

2017-02-17 Thread Jan Beulich
>>> On 15.02.17 at 18:39,  wrote:
> @@ -1208,22 +1208,19 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, 
> unsigned offset)
>  
>  /*
>   * Unmap the vcpu info page if the guest decided to place it somewhere
> - * else. This is used from arch_domain_destroy and domain_soft_reset.
> + * else. This is used from domain_kill() and domain_soft_reset().
>   */
>  void unmap_vcpu_info(struct vcpu *v)
>  {
> -unsigned long mfn;
> -
> -if ( v->vcpu_info_mfn == mfn_x(INVALID_MFN) )
> +if ( mfn_eq(v->vcpu_info_mfn, INVALID_MFN) )
>  return;
>  
> -mfn = v->vcpu_info_mfn;
>  unmap_domain_page_global((void *)
>   ((unsigned long)v->vcpu_info & PAGE_MASK));
>  
>  vcpu_info_reset(v);
>  
> -put_page_and_type(mfn_to_page(mfn));
> +put_page_and_type(mfn_to_page(mfn_x(v->vcpu_info_mfn)));
>  }

The elimination of the local variable here is wrong, as the failing smoke
tests show: vcpu_info_reset() sets v->vcpu_info_mfn to INVALID_MFN.

Jan


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


Re: [Xen-devel] [PATCH 2/2] common/vcpu: Switch v->vcpu_info_mfn to mfn_t

2017-02-16 Thread Jan Beulich
>>> On 15.02.17 at 18:39,  wrote:
> No functional change.
> 
> Signed-off-by: Andrew Cooper 

Reviewed-by: Jan Beulich 



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