On 08/08/18 14:15, Paul Durrant wrote:
>>
>>>>>> @@ -3906,6 +3943,38 @@ int gnttab_map_frame(struct domain *d,
>>>>> unsigned long idx, gfn_t gfn,
>>>>>>      return rc;
>>>>>>  }
>>>>>>
>>>>>> +int gnttab_get_shared_frame(struct domain *d, unsigned long idx,
>>>>>> +                            mfn_t *mfn)
>>>>>> +{
>>>>>> +    struct grant_table *gt = d->grant_table;
>>>>>> +    int rc;
>>>>>> +
>>>>>> +    grant_write_lock(gt);
>>>>>> +
>>>>>> +    if ( gt->gt_version == 0 )
>>>>>> +        gt->gt_version = 1;
>>>>> Since you've moved this here instead of dropping it, what requirement
>>>>> have you found for this to be set (other than the ASSERT() you put in
>>>>> gnttab_get_shared_frame_mfn()?
>>>>>
>>>> The code in patch #2 is executed before the grant table version is set. I
>>>> could alternatively have libxl explicitly set the version to 1 before 
>>>> trying
>>>> to seed the table.
>>> But that's not my point. What's wrong with leaving it at zero?
>>>
>> I'm not particularly happy calling gnttab_grow_table() with version left at 0
>> but I can try it and see if it breaks.
> Actually, no. There is nowhere else that leaves it at 0 and I find that I 
> can't set the version explicitly from the toolstack as gnttab_set_version 
> doesn't take a domid as a parameter. I'll leave the version setting as-is.

Yeah - this looks like the best option for now, and I'll fix the
defaulting-to-1 in due course.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to