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

Re: [Xen-devel] [PATCH v2 1/2] x86/mem-sharing: Bulk mem-sharing entire domains




>> > +Â Â Â Â Â Â 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@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®.