Message ID | 20241219134843.443085-1-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
On 12/19/24 05:48, Paolo Bonzini wrote: > The following changes since commit 8032c78e556cd0baec111740a6c636863f9bd7c8: > > Merge tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-12-16 14:20:33 -0500) > > are available in the Git repository at: > > https://gitlab.com/bonzini/qemu.git tags/for-upstream > > for you to fetch changes up to 9c70b74bd8c7a3753b80a1aab22a0dc58da1ed68: > > rust: pl011: simplify handling of the FIFO enabled bit in LCR (2024-12-19 14:37:58 +0100) > > ---------------------------------------------------------------- > * qdev: second part of Property cleanups > * rust: second part of QOM rework > * rust: callbacks wrapper > * rust: pl011 bugfixes > * kvm: cleanup errors in kvm_convert_memory() > > ---------------------------------------------------------------- > v1->v2: I noticed that "meson test" returns success even if the tests actually failed > with SIGSEGV! Sorry for not noticing that before. For now I added a bandaid > in the form of "--test-threads 1" and replaced the Mutex<Cell<bool>> with a > BqlCell<bool> for documentation purposes. > > Maciej S. Szmigiero (1): > target/i386: Reset TSCs of parked vCPUs too on VM reset > > Paolo Bonzini (17): > rust: qom: put class_init together from multiple ClassInitImpl<> > rust: qom: add possibility of overriding unparent > rust: rename qemu-api modules to follow C code a bit more > rust: re-export C types from qemu-api submodules > bql: add a "mock" BQL for Rust unit tests > rust: tests: allow writing more than one test > rust: qom: add casting functionality > rust: qom: add initial subset of methods on Object > rust: qemu-api: add a module to wrap functions and zero-sized closures > kvm: consistently return 0/-errno from kvm_convert_memory > rust: pl011: fix declaration of LineControl bits > rust: pl011: match break logic of C version > rust: pl011: always use reset() method on registers > rust: pl011: fix break errors and definition of Data struct > rust: pl011: extend registers to 32 bits > rust: pl011: fix migration stream > rust: pl011: simplify handling of the FIFO enabled bit in LCR > > Richard Henderson (24): > migration: Constify migration_properties > hw/ide: Constify sysbus_ahci_properties > target/ppc: Remove empty property list > target/s390x: Use s390x_cpu_properties for system mode only > hw/pci-host/astro: Remove empty Property list > hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM > hw/tricore: Remove empty Property lists > hw/s390x: Remove empty Property lists > hw/xen: Remove empty Property lists > hw/sparc: Remove empty Property lists > hw/virtio: Remove empty Property lists > include/hw/qdev-core: Detect most empty Property lists at compile time > hw/core: Introduce device_class_set_props_n > migration: Use device_class_set_props_n > hw/scsi/megasas: Use device_class_set_props_n > hw/arm/armsse: Use device_class_set_props_n > rust/qemu-api: Use device_class_set_props_n > hw/core: Replace device_class_set_props with a macro > target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST > include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST > include/hw/qdev-properties: Shrink struct Property > hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr > hw/core/qdev-properties: Constify Property argument to PropertyInfo.print > Constify all opaque Property pointers Please, really, replace my constify series with v2. r~
On 12/19/24 19:27, Richard Henderson wrote:
> Please, really, replace my constify series with v2.
Sure, sorry about that. I squashed this difference in from v1's final result:
diff --git b/include/hw/qdev-core.h a/include/hw/qdev-core.h
index c404bf55550..e6ef80b7fd0 100644
--- b/include/hw/qdev-core.h
+++ a/include/hw/qdev-core.h
@@ -947,8 +947,8 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
* you attempt to add an existing property defined by a parent class.
* To modify an inherited property you need to use????
*
- * Validate that @props has at least one Property plus the terminator.
- * Validate that @props is an array via ARRAY_SIZE.
+ * Validate that @props has at least one Property.
+ * Validate that @props is an array, not a pointer, via ARRAY_SIZE.
* Validate that the array does not have a legacy terminator at compile-time;
* requires -O2 and the array to be const.
*/
and this one because otherwise clippy complains:
diff --git b/rust/qemu-api/src/device_class.rs a/rust/qemu-api/src/device_class.rs
index cca51fe1a98..c98f0b2c7da 100644
--- b/rust/qemu-api/src/device_class.rs
+++ a/rust/qemu-api/src/device_class.rs
@@ -87,7 +87,7 @@ fn vmsd() -> Option<&'static VMStateDescription> {
dc.vmsd = vmsd;
}
let prop = <T as DeviceImpl>::properties();
- if prop.len() != 0 {
+ if !prop.is_empty() {
bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
}
}
Paolo
Hi Paolo, Will there be a v3? It wasn't clear to me from Richard and your replies to v2 whether another revision is needed. Thanks, Stefan
Il gio 19 dic 2024, 21:06 Stefan Hajnoczi <stefanha@redhat.com> ha scritto: > Hi Paolo, > Will there be a v3? It wasn't clear to me from Richard and your replies > to v2 whether another revision is needed. > Yes, I will send it now. Paolo > Thanks, > Stefan >