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

Re: [Xen-devel] [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset



>>> On 03.06.15 at 15:35, <vkuznets@xxxxxxxxxx> wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -1116,12 +1116,12 @@ 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 only used from arch_domain_destroy, so there's no
> - * need to do anything clever.
> + * else.
>   */
>  void unmap_vcpu_info(struct vcpu *v)

Please retain the full comment, extending it by the new caller's name.

> @@ -1129,8 +1129,9 @@ void unmap_vcpu_info(struct vcpu *v)
>      mfn = v->vcpu_info_mfn;
>      unmap_domain_page_global((void *)
>                               ((unsigned long)v->vcpu_info & PAGE_MASK));
> -
> -    v->vcpu_info = &dummy_vcpu_info;
> +    v->vcpu_info = ((v->vcpu_id < XEN_LEGACY_MAX_VCPUS)
> +                    ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id])

Is this cast really needed?

> @@ -1446,6 +1447,34 @@ int continue_hypercall_on_cpu(
>      return 0;
>  }
>  
> +int domain_soft_reset(struct domain *d)
> +{
> +    struct vcpu *v;
> +    int ret = 0;

Pointless initializer.

> +    for_each_vcpu ( d, v )
> +    {
> +        if ( v != current )
> +            vcpu_pause(v);
> +    }
> +
> +    evtchn_reset(d, 1);
> +
> +    ret = grant_table_soft_reset(d);
> +    if ( ret )
> +        goto vcpu_unpause;
> +
> +    for_each_vcpu ( d, v )
> +            unmap_vcpu_info(v);

Indentation.

Jan


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