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

Re: [PATCH] xen/include/public: add macro for invalid grant reference



On 21.02.22 15:18, Jan Beulich wrote:
On 21.02.2022 13:42, Juergen Gross wrote:
Providing a macro for an invalid grant reference would be beneficial
for users, especially as some are using the wrong value "0" for that
purpose.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Over the years I've been considering to add such to the public
interface, perhaps even more than once. But I'm afraid it's not that
easy. In principle 0xffffffff (which btw isn't necessarily ~0u) could

I can change that to use 0xffffffff explicitly.

be a valid ref. It is really internal agreement by users of the
interface to set for themselves that they're not ever going to make
a valid grant behind that reference.

As the grant reference is an index into the grant table this would
limit the size of the grant table to "only" UINT_MAX - 1. I don't
think this will be ever a concern (other than an academical one).


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

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