|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04 of 18] x86/mm: Update mem sharing interface to (re)allow sharing of grants
> Hi,
>
> At 02:47 -0500 on 08 Dec (1323312439), Andres Lagar-Cavilla wrote:
>> + if (
>> XEN_DOMCTL_MEM_SHARING_FIELD_IS_GREF(mec->u.share.client_gfn) )
>> + {
>> + grant_ref_t gref = (grant_ref_t)
>> +
>> (XEN_DOMCTL_MEM_SHARING_FIELD_GET_GREF(
>> + mec->u.share.client_gfn));
>> + if ( (!source_is_gref) ||
>> + (mem_sharing_gref_to_gfn(cd, gref, &cgfn) < 0) )
>> + {
>> + put_domain(cd);
>> + return -EINVAL;
>> + }
>> + } else {
>> + if ( source_is_gref )
>> + {
>> + put_domain(cd);
>> + return -EINVAL;
>> + }
>
> Why can't one input be a grant and the other not? If there's a problem
> with that it should probably be documented in the hypercall interface.
>
No particular problem. The gref use case is the current target of
tools/memshr, which always does gref-to-gref sharing. I imagine
gref-to-gfn sharing to be extremely unlikely.
But there is no need to disallow it.
Andres
> Cheers,
>
> Tim.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |