[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH 0/6] xen/abi: On wide bitfields inside primitive types
On Tue Oct 29, 2024 at 6:16 PM GMT, Alejandro Vallejo wrote: > Non-boolean bitfields in the hypercall ABI make it fairly inconvenient to > create bindings for any language because (a) they are always ad-hoc and are > subject to restrictions regular fields are not (b) require boilerplate that > regular fields do not and (c) might not even be part of the core language, > forcing avoidable external libraries into any sort of generic library. > > This patch (it's a series merely to split roughly by maintainer) is one such > case that I happened to spot while playing around. It's the grant_version > field, buried under an otherwise empty grant_opts. > > The invariant I'd like to (slowly) introduce and discuss is that fields may > have bitflags (e.g: a packed array of booleans indexed by some enumerated > type), but not be mixed with wider fields in the same primitive type. This > ensures any field containing an integer of any kind can be referred by pointer > and treated the same way as any other with regards to sizeof() and the like. > > I'd like to have a certain consensus about this general point before going > establishing this restriction in the IDL system I'm working on. > > My preference would be to fold everything into a single patch if we decide to > follow through with this particular case. As I said before, the split is > artificial for review. > > Alejandro Vallejo (6): > xen/domctl: Refine grant_opts into grant_version > tools: Rename grant_opts to grant_version > tools/ocaml: Rename grant_opts to grant_version > xen/arm: Rename grant_opts to grant_version > xen/x86: Rename grant_opts to grant_version > xen/common: Rename grant_opts to grant_version > > tools/helpers/init-xenstore-domain.c | 2 +- > tools/libs/light/libxl_create.c | 2 +- > tools/ocaml/libs/xc/xenctrl_stubs.c | 3 +-- > tools/python/xen/lowlevel/xc/xc.c | 2 +- > tools/tests/paging-mempool/test-paging-mempool.c | 2 +- > tools/tests/resource/test-resource.c | 6 +++--- > tools/tests/tsx/test-tsx.c | 4 ++-- > xen/arch/arm/dom0less-build.c | 4 ++-- > xen/arch/arm/domain_build.c | 2 +- > xen/arch/x86/setup.c | 2 +- > xen/common/domain.c | 6 +++--- > xen/common/grant_table.c | 3 +-- > xen/include/public/domctl.h | 15 +++++++++++---- > xen/include/xen/grant_table.h | 4 ++-- > 14 files changed, 31 insertions(+), 26 deletions(-) Bah. I sent it too early. The new field in patches 2-6 ought to be max_grant_version. Regardless, the general point still holds, I hope. Cheers, Alejandro
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |