[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
- To: Jan Beulich <JBeulich@xxxxxxxx>
- From: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
- Date: Thu, 15 Oct 2015 10:54:34 -0600
- Cc: Wei Liu <wei.liu2@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tamas K Lengyel <tlengyel@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>
- Delivery-date: Thu, 15 Oct 2015 16:54:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
>> > +Â Â Â Â Â Â 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
|