>>> 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