>
>
> >> > +            rc = xsm_mem_sharing_op(XSM_DM_PRIV, d, cd, mso.op);
> >> > +            if ( rc )
> >> > +            {
> >> > +                rcu_unlock_domain(cd);
> >> > +                goto out;
> >> > +            }
> >> > +
> >> > +            if ( !mem_sharing_enabled(cd) )
> >> > +            {
> >> > +                rcu_unlock_domain(cd);
> >> > +                rc = -EINVAL;
> >> > +                goto out;
> >> > +            }
> >> > +
> >> > +            max_sgfn = domain_get_maximum_gpfn(d);
> >> > +            max_cgfn = domain_get_maximum_gpfn(cd);
> >> > +
> >> > +            if ( max_sgfn != max_cgfn || max_sgfn < mso.u.bulk.start
> )
> >>
> >> Are both domains required to be paused for this operation? If so,
> >> shouldn't you enforce this? If not, by the time you reach the if()
> >> the values are stale.
> >
> > It's expected that the user has exclusive tool-side lock on the domains
> > before issuing this hypercall and that the domains are paused already.
>
> As said -  in that case, please enforce this (by bailing if not so).
>

Is there a convenient way to check if a domain is already paused? I can't
seem to find anything of that effect.

Thanks,
Tamas
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to