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

Re: [PATCH v3] xen/public: add comment to struct xen_mem_acquire_resource


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 24 Feb 2022 17:23:09 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UeRz2cvuqd2++ZLhwlWnNIrggwqyR2u29a5qNOTVmSE=; b=JmbRp8kHNfSWSU0WEG+FI3R5yQBnhf6X6PZVeN+5zdHi7aclh52zyrTVn10PS6INFd2pCKxAP5wz3gDpioXSnESTfnKeUOpLFaxxN+6qF6jiL+EqJyx+R2p2UqdnEvU3QUvocEF1Huf4VZDT2OWzaBtEmoR/XrJSKNnmqPLbGedTIoylKl2KvLrN5jFBumpG9ao6AcOfCLpuA8AqcElLfaqFbuC+lc1YMt56b4zW8V+NA7jgdELn0X3hlrz7gC+KUy0Aj/p0aPqqbn/jEryXU/QAjWhrrMNSk5lb4Qw5ox35WeLLLRq/EzG/8vMl3FGW4nuw+pofmC/vIEd4NVBgcw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ajsgex7F9uLbUSLe1uONHuR2fLymo4LFc4IF9pH8VgGp99PN6VYuNq+yF07CGhv0BKZD91TClhguNdayY/dvMh1wdOChtwUSjcjBGtfQTL5+QAquutlt/Z+MfaevIkABO1FMsS6Vy8bekLnIOcKd4bg0mVnTuoGHsKKQ5lGxLUKH0dGV5fm8ock8e0wMOoLah+F//vvcUbh9433df7PL5w+gso5UMPY7wSZxLGfnmQuFxjJgJUJH1SQSw2WM/ysVZ9uyNKNqloV4VxEO/zL8K9v8WCWqpmx4HuMlFAEaXp3XyN+yd7hOsO0sFXnp3c2WQZx0P9YUw9FooTUqNaaaHQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 24 Feb 2022 16:23:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.02.2022 16:41, Juergen Gross wrote:
> On 24.02.22 16:37, Jan Beulich wrote:
>> On 24.02.2022 16:24, Juergen Gross wrote:
>>> --- a/xen/include/public/memory.h
>>> +++ b/xen/include/public/memory.h
>>> @@ -662,6 +662,13 @@ struct xen_mem_acquire_resource {
>>>        * two calls.
>>>        */
>>>       uint32_t nr_frames;
>>> +    /*
>>> +     * Padding field, must be zero on input.
>>> +     * In a previous version this was an output field with the lowest
>>> +     * bit named XENMEM_rsrc_acq_caller_owned. Future versions of this
>>> +     * interface will not reuse this bit with the field being zero on
>>> +     * input.
>>> +     */
>>>       uint32_t pad;
>>
>> Did you mean "... being non-zero ..." and "bit" and "field" changing
>> positions?
> 
> No, why? The current Linux kernel will set pad (the "field") to zero
> when doing the hypercall, and it expects the bit to be set or not on
> return. This means that the bit is reserved for the case that pad
> was zero on input.

Hmm, maybe I got confused (but only in part by the wording). The bit is
fine to use as input. This will mean the field is not zero on input, but
the way this is worded is somewhat confusing. How about making things
explicit: "... will not reuse this bit as an output with the field being
zero on input"? Then
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
and I'd be fine making the adjustment while committing.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.