RFC xen/abi: On wide bitfields inside primitive types
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest6 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | xen/domctl: Refine grant_opts into grant_versionxen/ | +11 | 2 replies | |
| 2/6 | tools: Rename grant_opts to grant_versiontools/ tools/ tools/ +3 more | +9 | 0 replies | |
| 3/6 | tools/ocaml: Rename grant_opts to grant_versiontools/ | +1 | 0 replies | |
| 4/6 | xen/arm: Rename grant_opts to grant_versionxen/ xen/ | +3 | 0 replies | |
| 5/6 | xen/x86: Rename grant_opts to grant_versionxen/ | +1 | 0 replies | |
| 6/6 | xen/common: Rename grant_opts to grant_versionxen/ xen/ xen/ | +6 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Christian Lindig |
|---|---|
| Series | A-b |
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/6] xen/abi: On wide bitfields inside primitive types
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(-)
Signature · 1 line
2.47.0