mbox series

[v2,0/2] memattrs: miscellaneous cleanup to support memattrs binding

Message ID 20250121151322.171832-1-zhao1.liu@intel.com (mailing list archive)
Headers show
Series memattrs: miscellaneous cleanup to support memattrs binding | expand

Message

Zhao Liu Jan. 21, 2025, 3:13 p.m. UTC
Hi,

This is my v2. The link to v1 seems to be partially missing [1], and I've
also double-checked previous comments from Peter, CLEMENT and Paolo to
make sure I haven't lost everyone's feedback :-) (and because of
yesterday's little mix-up, I also realized in time that I almost missed
Paolo's feedback...).

Introduction
============

This series tries to address the previous comments for memattrs
binding [2].

Since bindgen has many limitations on bit fields conversion and it is
unable to generate an equivalent macro definition for MEMTXATTRS_UNSPECIFIED,
so that memattrs binding requires the external crate to solve many
annoyances caused by bit fields.

The easiest way, therefore, is to remove bit fields from memattrs. And
that's what this series does.

[1]: https://lore.kernel.org/qemu-devel/Z4+P3eHXqcU4Dqdx@intel.com/T/#m8481b68ec3c38f6281dc96ed77fa376b0bdd1e7e
[2]: https://lore.kernel.org/qemu-devel/20241205060714.256270-7-zhao1.liu@intel.com/

Thanks and Best Regards,
Zhao

---
Zhao Liu (2):
  memattrs: Convert unspecified member to bool
  memattrs: Check the size of MemTxAttrs

 include/exec/memattrs.h | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)