|
[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
>>> On 15.10.15 at 18:54, <tamas@xxxxxxxxxxxxx> wrote:
>>
>>
>> >> > + 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.
I notice that you already sent out v3, but you check ->pause_count
there. You really want to look at controller_pause_count, as Xen
internal pausing is something that you would have to expect to change
behind your back (controller based pausing could change too of course,
but that would be a tool stack bug then).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |