[PATCH 00/10] Next round of qemu_api patches

Paolo Bonzini posted 10 patches 4 days, 5 hours ago
There is a newer version of this series
rust/hw/char/pl011/src/device.rs  |  81 ++++++++--------
rust/hw/char/pl011/src/lib.rs     |  28 +-----
rust/qemu-api-macros/src/lib.rs   | 150 ++++++++++++++++++++++--------
rust/qemu-api-macros/src/utils.rs |  26 ++++++
rust/qemu-api/meson.build         |   1 +
rust/qemu-api/src/assertions.rs   |  90 ++++++++++++++++++
rust/qemu-api/src/lib.rs          |   1 +
rust/qemu-api/src/qom.rs          |  77 ++++++++++++---
rust/qemu-api/src/sysbus.rs       |  12 +++
rust/qemu-api/tests/tests.rs      |   4 +-
10 files changed, 351 insertions(+), 119 deletions(-)
create mode 100644 rust/qemu-api-macros/src/utils.rs
create mode 100644 rust/qemu-api/src/assertions.rs
[PATCH 00/10] Next round of qemu_api patches
Posted by Paolo Bonzini 4 days, 5 hours ago
This includes:

1) the outcome of reviewing
   https://lore.kernel.org/qemu-devel/20241209123717.99077-1-pbonzini@redhat.com/T/,
   especially with respect to instance_finalize implementation and
   Rust-defined subclasses (patches 1-6)

2) the beginnings of separating instance_init/instance_post_init
   (patches 7-8)

3) extracting pl011's logic to convert an integer into an enum into a
   #[derive(TryInto)] procedural macro.

Zhao: I have placed these in rust-next, but feel free to ignore them for
your next HPET submission.  I have also included in rust-next your test
additions for usage in CI, but I'm not including them here to give you
the opportunity to post them with a commit message and a signed-off-by.

Paolo

Paolo Bonzini (10):
  rust: qom: add ParentField
  rust: add a utility module for compile-time type checks
  rust: macros: check that the first field of a #[derive(Object)] struct is a ParentField
  rust: macros: check that #[derive(Object)] requires #[repr(C)]
  rust: qom: automatically use Drop trait to implement instance_finalize
  rust: qom: move device_id to PL011 class side
  rust: pl011: only leave embedded object initialization in instance_init
  rust: qom: make INSTANCE_POST_INIT take a shared reference
  rust: qemu-api-macros: extend error reporting facility to parse errors
  rust: qemu-api-macros: add automatic TryFrom/TryInto derivation

 rust/hw/char/pl011/src/device.rs  |  81 ++++++++--------
 rust/hw/char/pl011/src/lib.rs     |  28 +-----
 rust/qemu-api-macros/src/lib.rs   | 150 ++++++++++++++++++++++--------
 rust/qemu-api-macros/src/utils.rs |  26 ++++++
 rust/qemu-api/meson.build         |   1 +
 rust/qemu-api/src/assertions.rs   |  90 ++++++++++++++++++
 rust/qemu-api/src/lib.rs          |   1 +
 rust/qemu-api/src/qom.rs          |  77 ++++++++++++---
 rust/qemu-api/src/sysbus.rs       |  12 +++
 rust/qemu-api/tests/tests.rs      |   4 +-
 10 files changed, 351 insertions(+), 119 deletions(-)
 create mode 100644 rust/qemu-api-macros/src/utils.rs
 create mode 100644 rust/qemu-api/src/assertions.rs

-- 
2.47.1