History log of /qemu/rust/hw/char/ (Results 26 – 50 of 105)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
567c0c4113-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011, qemu_api tests: do not use ClassInitImpl

Outside the qemu_api crate, orphan rules make the usage of ClassInitImpl
unwieldy. Now that it is optional, do not use it.

For PL011Class, thi

rust: pl011, qemu_api tests: do not use ClassInitImpl

Outside the qemu_api crate, orphan rules make the usage of ClassInitImpl
unwieldy. Now that it is optional, do not use it.

For PL011Class, this makes it easier to provide a PL011Impl trait similar
to the ones in the qemu_api crate. The device id consts are moved there.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

4551f34212-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: qom: add ObjectImpl::CLASS_INIT

As shown in the PL011 device, the orphan rules required a manual
implementation of ClassInitImpl for anything not in the qemu_api crate;
this gets in the way of

rust: qom: add ObjectImpl::CLASS_INIT

As shown in the PL011 device, the orphan rules required a manual
implementation of ClassInitImpl for anything not in the qemu_api crate;
this gets in the way of moving system emulation-specific code (including
DeviceClass, which as a blanket ClassInitImpl<DeviceClass> implementation)
into its own crate.

Make ClassInitImpl optional, at the cost of having to specify the CLASS_INIT
member by hand in every implementation of ObjectImpl. The next commits will
get rid of it, replacing all the "impl<T> ClassInitImpl<Class> for T" blocks
with a generic class_init<T> method on Class.

Right now the definition is always the same, but do not provide a default
as that will not be true once ClassInitImpl goes away.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

3212da0012-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: add SysBusDeviceImpl

The only function, right now, is to ensure that anything with a
SysBusDeviceClass class is a SysBusDevice.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paol

rust: add SysBusDeviceImpl

The only function, right now, is to ensure that anything with a
SysBusDeviceClass class is a SysBusDevice.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

c48700e818-Feb-2025 Zhao Liu <zhao1.liu@intel.com>

rust: prefer importing std::ptr over core::ptr

The std::ptr is same as core::ptr, but std has already been used in many
cases and there's no need to choose non-std library.

So, use std::ptr directl

rust: prefer importing std::ptr over core::ptr

The std::ptr is same as core::ptr, but std has already been used in many
cases and there's no need to choose non-std library.

So, use std::ptr directly to make the used ptr library as consistent as
possible.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250218080835.3341082-1-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/qemu/.gitlab-ci.d/buildtest.yml
/qemu/MAINTAINERS
/qemu/accel/kvm/kvm-all.c
/qemu/accel/tcg/cputlb.c
/qemu/accel/tcg/tcg-all.c
/qemu/backends/cryptodev-vhost.c
/qemu/backends/tpm/tpm_util.c
/qemu/configs/devices/aarch64-softmmu/default.mak
/qemu/configs/devices/i386-softmmu/default.mak
/qemu/crypto/hash-afalg.c
/qemu/crypto/tlssession.c
/qemu/docs/about/deprecated.rst
/qemu/docs/about/removed-features.rst
/qemu/docs/devel/multi-thread-tcg.rst
/qemu/docs/devel/reset.rst
/qemu/docs/devel/rust.rst
/qemu/docs/devel/tcg-ops.rst
/qemu/docs/pcie_sriov.txt
/qemu/docs/system/arm/nuvoton.rst
/qemu/hw/arm/Kconfig
/qemu/hw/arm/allwinner-a10.c
/qemu/hw/arm/allwinner-h3.c
/qemu/hw/arm/allwinner-r40.c
/qemu/hw/arm/aspeed.c
/qemu/hw/arm/bananapi_m2u.c
/qemu/hw/arm/cubieboard.c
/qemu/hw/arm/exynos4210.c
/qemu/hw/arm/exynos4_boards.c
/qemu/hw/arm/fby35.c
/qemu/hw/arm/highbank.c
/qemu/hw/arm/imx25_pdk.c
/qemu/hw/arm/integratorcp.c
/qemu/hw/arm/mcimx6ul-evk.c
/qemu/hw/arm/mcimx7d-sabre.c
/qemu/hw/arm/meson.build
/qemu/hw/arm/npcm7xx.c
/qemu/hw/arm/npcm7xx_boards.c
/qemu/hw/arm/npcm8xx.c
/qemu/hw/arm/npcm8xx_boards.c
/qemu/hw/arm/omap_sx1.c
/qemu/hw/arm/orangepi.c
/qemu/hw/arm/raspi.c
/qemu/hw/arm/raspi4b.c
/qemu/hw/arm/realview.c
/qemu/hw/arm/sabrelite.c
/qemu/hw/arm/smmu-common.c
/qemu/hw/arm/smmuv3.c
/qemu/hw/arm/stellaris.c
/qemu/hw/arm/trace-events
/qemu/hw/arm/versatilepb.c
/qemu/hw/arm/vexpress.c
/qemu/hw/arm/xilinx_zynq.c
/qemu/hw/arm/xlnx-versal-virt.c
/qemu/hw/arm/xlnx-zcu102.c
/qemu/hw/arm/xlnx-zynqmp.c
/qemu/hw/char/xilinx_uartlite.c
/qemu/hw/core/cpu-system.c
/qemu/hw/core/loader.c
/qemu/hw/core/machine-smp.c
/qemu/hw/core/machine.c
/qemu/hw/core/null-machine.c
/qemu/hw/core/qdev-properties-system.c
/qemu/hw/core/sysbus.c
/qemu/hw/cpu/a15mpcore.c
/qemu/hw/cpu/a9mpcore.c
/qemu/hw/cxl/cxl-component-utils.c
/qemu/hw/cxl/cxl-device-utils.c
/qemu/hw/cxl/switch-mailbox-cci.c
/qemu/hw/display/apple-gfx.m
/qemu/hw/display/ramfb-standalone.c
/qemu/hw/i2c/allwinner-i2c.c
/qemu/hw/i386/amd_iommu.c
/qemu/hw/i386/amd_iommu.h
/qemu/hw/i386/fw_cfg.c
/qemu/hw/i386/intel_iommu.c
/qemu/hw/i386/microvm.c
/qemu/hw/i386/pc.c
/qemu/hw/i386/trace-events
/qemu/hw/i386/x86-iommu.c
/qemu/hw/intc/allwinner-a10-pic.c
/qemu/hw/intc/apic.c
/qemu/hw/intc/arm_gicv3_cpuif.c
/qemu/hw/intc/xilinx_intc.c
/qemu/hw/isa/vt82c686.c
/qemu/hw/mem/cxl_type3.c
/qemu/hw/microblaze/petalogix_ml605_mmu.c
/qemu/hw/microblaze/petalogix_s3adsp1800_mmu.c
/qemu/hw/mips/boston.c
/qemu/hw/mips/loongson3_virt.c
/qemu/hw/misc/allwinner-a10-ccm.c
/qemu/hw/misc/allwinner-a10-dramc.c
/qemu/hw/misc/allwinner-cpucfg.c
/qemu/hw/misc/allwinner-h3-ccu.c
/qemu/hw/misc/allwinner-h3-dramc.c
/qemu/hw/misc/allwinner-h3-sysctrl.c
/qemu/hw/misc/allwinner-r40-ccu.c
/qemu/hw/misc/allwinner-r40-dramc.c
/qemu/hw/misc/allwinner-sid.c
/qemu/hw/misc/allwinner-sramc.c
/qemu/hw/misc/meson.build
/qemu/hw/misc/npcm_clk.c
/qemu/hw/misc/npcm_gcr.c
/qemu/hw/misc/trace-events
/qemu/hw/net/allwinner-sun8i-emac.c
/qemu/hw/net/allwinner_emac.c
/qemu/hw/net/fsl_etsec/etsec.c
/qemu/hw/net/igb.c
/qemu/hw/net/meson.build
/qemu/hw/net/npcm_pcs.c
/qemu/hw/net/smc91c111.c
/qemu/hw/net/trace-events
/qemu/hw/net/virtio-net.c
/qemu/hw/net/xilinx_ethlite.c
/qemu/hw/nvme/ctrl.c
/qemu/hw/pci-host/versatile.c
/qemu/hw/pci/msix.c
/qemu/hw/pci/pci.c
/qemu/hw/pci/pcie_sriov.c
/qemu/hw/pci/trace-events
/qemu/hw/ppc/spapr_caps.c
/qemu/hw/ppc/spapr_pci.c
/qemu/hw/ppc/virtex_ml507.c
/qemu/hw/remote/mpqemu-link.c
/qemu/hw/remote/vfio-user-obj.c
/qemu/hw/riscv/microblaze-v-generic.c
/qemu/hw/riscv/microchip_pfsoc.c
/qemu/hw/riscv/opentitan.c
/qemu/hw/riscv/sifive_u.c
/qemu/hw/rtc/allwinner-rtc.c
/qemu/hw/rtc/m48t59-isa.c
/qemu/hw/rtc/m48t59.c
/qemu/hw/rx/rx-gdbsim.c
/qemu/hw/s390x/s390-pci-bus.c
/qemu/hw/s390x/s390-virtio-ccw.c
/qemu/hw/sd/allwinner-sdhost.c
/qemu/hw/sd/sdhci-internal.h
/qemu/hw/sd/sdhci.c
/qemu/hw/sensor/emc141x.c
/qemu/hw/sensor/isl_pmbus_vr.c
/qemu/hw/sensor/tmp421.c
/qemu/hw/ssi/allwinner-a10-spi.c
/qemu/hw/ssi/npcm7xx_fiu.c
/qemu/hw/ssi/xilinx_spi.c
/qemu/hw/timer/Kconfig
/qemu/hw/timer/allwinner-a10-pit.c
/qemu/hw/timer/hpet.c
/qemu/hw/timer/xilinx_timer.c
/qemu/hw/tpm/tpm_tis_sysbus.c
/qemu/hw/ufs/ufs.c
/qemu/hw/usb/Kconfig
/qemu/hw/usb/hcd-ehci-pci.c
/qemu/hw/usb/hcd-uhci.c
/qemu/hw/usb/meson.build
/qemu/hw/usb/xen-usb.c
/qemu/hw/vfio/amd-xgbe.c
/qemu/hw/vfio/calxeda-xgmac.c
/qemu/hw/vfio/common.c
/qemu/hw/vfio/platform.c
/qemu/hw/vfio/trace-events
/qemu/hw/virtio/trace-events
/qemu/hw/virtio/vhost-iova-tree.c
/qemu/hw/virtio/vhost-iova-tree.h
/qemu/hw/virtio/vhost-shadow-virtqueue.c
/qemu/hw/virtio/vhost-shadow-virtqueue.h
/qemu/hw/virtio/vhost-user-snd.c
/qemu/hw/virtio/vhost-vdpa.c
/qemu/hw/virtio/virtio-balloon.c
/qemu/hw/virtio/virtio-iommu.c
/qemu/hw/virtio/virtio-mem.c
/qemu/hw/virtio/virtio-nsm.c
/qemu/hw/watchdog/allwinner-wdt.c
/qemu/hw/xen/xen-legacy-backend.c
/qemu/hw/xen/xen_pvdev.c
/qemu/include/crypto/tlssession.h
/qemu/include/exec/cpu-common.h
/qemu/include/exec/memattrs.h
/qemu/include/exec/memory.h
/qemu/include/exec/tlb-common.h
/qemu/include/exec/vaddr.h
/qemu/include/hw/arm/npcm7xx.h
/qemu/include/hw/arm/npcm8xx.h
/qemu/include/hw/boards.h
/qemu/include/hw/cxl/cxl_device.h
/qemu/include/hw/misc/npcm_clk.h
/qemu/include/hw/misc/npcm_gcr.h
/qemu/include/hw/net/npcm_pcs.h
/qemu/include/hw/pci/pcie_sriov.h
/qemu/include/hw/qdev-properties-system.h
/qemu/include/hw/ssi/npcm7xx_fiu.h
/qemu/include/hw/sysbus.h
/qemu/include/hw/timer/hpet.h
/qemu/include/hw/virtio/virtio-balloon.h
/qemu/include/hw/xen/xen_pvdev.h
/qemu/include/io/channel-tls.h
/qemu/include/io/channel.h
/qemu/include/qemu/atomic.h
/qemu/include/qemu/iova-tree.h
/qemu/include/qemu/timer.h
/qemu/include/system/os-posix.h
/qemu/include/system/os-win32.h
/qemu/include/system/system.h
/qemu/include/tcg/tcg-opc.h
/qemu/include/tcg/tcg.h
/qemu/io/channel-tls.c
/qemu/io/channel.c
/qemu/io/trace-events
/qemu/linux-user/aarch64/target_signal.h
/qemu/linux-user/arm/target_signal.h
/qemu/linux-user/elfload.c
/qemu/linux-user/generic/signal.h
/qemu/linux-user/i386/target_signal.h
/qemu/linux-user/m68k/target_signal.h
/qemu/linux-user/microblaze/target_signal.h
/qemu/linux-user/ppc/target_signal.h
/qemu/linux-user/s390x/target_signal.h
/qemu/linux-user/sh4/target_signal.h
/qemu/linux-user/x86_64/target_signal.h
/qemu/linux-user/xtensa/target_signal.h
/qemu/meson.build
/qemu/migration/channel.c
/qemu/migration/cpr.c
/qemu/migration/migration.c
/qemu/migration/migration.h
/qemu/migration/multifd.c
/qemu/migration/multifd.h
/qemu/migration/options.c
/qemu/migration/postcopy-ram.c
/qemu/migration/ram.c
/qemu/migration/rdma.c
/qemu/migration/savevm.c
/qemu/migration/tls.c
/qemu/migration/tls.h
/qemu/migration/trace-events
/qemu/monitor/hmp-cmds-target.c
/qemu/net/vhost-user.c
/qemu/net/vhost-vdpa.c
/qemu/os-posix.c
/qemu/pc-bios/README
/qemu/pc-bios/meson.build
/qemu/pc-bios/npcm7xx_bootrom.bin
/qemu/pc-bios/npcm8xx_bootrom.bin
/qemu/plugins/api.c
/qemu/plugins/loader.c
/qemu/qapi/common.json
/qemu/qapi/migration.json
/qemu/qapi/net.json
/qemu/qemu-options.hx
/qemu/qom/object_interfaces.c
/qemu/roms/Makefile
/qemu/roms/vbootrom
/qemu/rust/Cargo.lock
/qemu/rust/Cargo.toml
/qemu/rust/hw/Kconfig
pl011/src/device.rs
pl011/src/device_class.rs
/qemu/rust/hw/meson.build
/qemu/rust/hw/timer/Kconfig
/qemu/rust/hw/timer/hpet/Cargo.toml
/qemu/rust/hw/timer/hpet/meson.build
/qemu/rust/hw/timer/hpet/src/fw_cfg.rs
/qemu/rust/hw/timer/hpet/src/hpet.rs
/qemu/rust/hw/timer/hpet/src/lib.rs
/qemu/rust/hw/timer/meson.build
/qemu/rust/qemu-api/Cargo.toml
/qemu/rust/qemu-api/meson.build
/qemu/rust/qemu-api/src/assertions.rs
/qemu/rust/qemu-api/src/bindings.rs
/qemu/rust/qemu-api/src/c_str.rs
/qemu/rust/qemu-api/src/errno.rs
/qemu/rust/qemu-api/src/irq.rs
/qemu/rust/qemu-api/src/lib.rs
/qemu/rust/qemu-api/src/memory.rs
/qemu/rust/qemu-api/src/offset_of.rs
/qemu/rust/qemu-api/src/prelude.rs
/qemu/rust/qemu-api/src/qdev.rs
/qemu/rust/qemu-api/src/sysbus.rs
/qemu/rust/qemu-api/src/timer.rs
/qemu/rust/qemu-api/src/vmstate.rs
/qemu/rust/qemu-api/src/zeroable.rs
/qemu/rust/qemu-api/tests/tests.rs
/qemu/rust/wrapper.h
/qemu/scripts/archive-source.sh
/qemu/scripts/make-release
/qemu/scripts/qemu-trace-stap
/qemu/subprojects/.gitignore
/qemu/subprojects/libc-0.2-rs.wrap
/qemu/subprojects/packagefiles/libc-0.2-rs/meson.build
/qemu/system/globals.c
/qemu/system/memory_ldst.c.inc
/qemu/system/physmem.c
/qemu/system/vl.c
/qemu/target/arm/cpregs.h
/qemu/target/arm/cpu.h
/qemu/target/arm/debug_helper.c
/qemu/target/arm/helper.c
/qemu/target/arm/ptw.c
/qemu/target/arm/tcg/op_helper.c
/qemu/target/arm/tcg/translate.c
/qemu/target/i386/cpu.c
/qemu/target/loongarch/tcg/insn_trans/trans_atomic.c.inc
/qemu/target/loongarch/tcg/translate.c
/qemu/target/mips/tcg/octeon_translate.c
/qemu/target/riscv/cpu.c
/qemu/target/riscv/cpu_helper.c
/qemu/target/sparc/gdbstub.c
/qemu/target/sparc/insns.decode
/qemu/target/sparc/translate.c
/qemu/tcg/aarch64/tcg-target-con-set.h
/qemu/tcg/aarch64/tcg-target.c.inc
/qemu/tcg/aarch64/tcg-target.h
/qemu/tcg/arm/tcg-target.c.inc
/qemu/tcg/i386/tcg-target.c.inc
/qemu/tcg/loongarch64/tcg-target-con-set.h
/qemu/tcg/loongarch64/tcg-target-con-str.h
/qemu/tcg/loongarch64/tcg-target-has.h
/qemu/tcg/loongarch64/tcg-target.c.inc
/qemu/tcg/loongarch64/tcg-target.h
/qemu/tcg/mips/tcg-target-con-set.h
/qemu/tcg/mips/tcg-target-con-str.h
/qemu/tcg/mips/tcg-target.c.inc
/qemu/tcg/mips/tcg-target.h
/qemu/tcg/optimize.c
/qemu/tcg/ppc/tcg-target.c.inc
/qemu/tcg/riscv/tcg-target-con-set.h
/qemu/tcg/riscv/tcg-target-con-str.h
/qemu/tcg/riscv/tcg-target-has.h
/qemu/tcg/riscv/tcg-target.c.inc
/qemu/tcg/riscv/tcg-target.h
/qemu/tcg/s390x/tcg-target.c.inc
/qemu/tcg/sparc64/tcg-target-con-set.h
/qemu/tcg/sparc64/tcg-target-con-str.h
/qemu/tcg/sparc64/tcg-target.c.inc
/qemu/tcg/sparc64/tcg-target.h
/qemu/tcg/tcg-op-ldst.c
/qemu/tcg/tcg.c
/qemu/tcg/tci.c
/qemu/tcg/tci/tcg-target.c.inc
/qemu/tcg/tci/tcg-target.h
/qemu/tests/functional/meson.build
/qemu/tests/functional/test_microblaze_s3adsp1800.py
/qemu/tests/functional/test_microblazeel_s3adsp1800.py
/qemu/tests/functional/test_virtio_balloon.py
/qemu/tests/migration-stress/guestperf/comparison.py
/qemu/tests/migration-stress/guestperf/engine.py
/qemu/tests/migration-stress/guestperf/report.py
/qemu/tests/migration-stress/guestperf/scenario.py
/qemu/tests/migration-stress/guestperf/shell.py
/qemu/tests/qemu-iotests/172.out
/qemu/tests/qtest/libqos/pci.c
/qemu/tests/qtest/meson.build
/qemu/tests/qtest/migration/migration-util.c
/qemu/tests/qtest/migration/migration-util.h
/qemu/tests/qtest/migration/precopy-tests.c
/qemu/tests/qtest/ufs-test.c
/qemu/tests/unit/test-crypto-tlssession.c
/qemu/trace/simple.c
/qemu/ui/console.c
/qemu/ui/gtk.c
/qemu/ui/meson.build
/qemu/ui/sdl2.c
/qemu/util/iova-tree.c
/qemu/util/module.c
7630ca2a10-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: convert pl011_create to safe Rust

Not a major change but, as a small but significant step in creating
qdev bindings, show how pl011_create can be written without "unsafe"
calls (apart f

rust: pl011: convert pl011_create to safe Rust

Not a major change but, as a small but significant step in creating
qdev bindings, show how pl011_create can be written without "unsafe"
calls (apart from converting pointers to references).

This also provides a starting point for creating Error** bindings.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

a22bd55f03-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: chardev, qdev: add bindings to qdev_prop_set_chr

Because the argument to the function is an Owned<Chardev>, this also
adds an ObjectType implementation to Chardev.

Reviewed-by: Zhao Liu <zhao

rust: chardev, qdev: add bindings to qdev_prop_set_chr

Because the argument to the function is an Owned<Chardev>, this also
adds an ObjectType implementation to Chardev.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

590faa0317-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: bindings for MemoryRegionOps

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

5472a38c17-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: qdev: switch from legacy reset to Resettable

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

201ef00117-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: qdev: add clock creation

Add a Rust version of qdev_init_clock_in, which can be used in
instance_init. There are a couple differences with the C
version:

- in Rust the object keeps its own r

rust: qdev: add clock creation

Add a Rust version of qdev_init_clock_in, which can be used in
instance_init. There are a couple differences with the C
version:

- in Rust the object keeps its own reference to the clock (in addition to
the one embedded in the NamedClockList), and the reference is dropped
automatically by instance_finalize(); this is encoded in the signature
of DeviceClassMethods::init_clock_in, which makes the lifetime of the
clock independent of that of the object it holds. This goes unnoticed
in the C version and is due to the existence of aliases.

- also, anything that happens during instance_init uses the pinned_init
framework to operate on a partially initialized object, and is done
through class methods (i.e. through DeviceClassMethods rather than
DeviceMethods) because the device does not exist yet. Therefore, Rust
code *must* create clocks from instance_init, which is stricter than C.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

ec3eba9831-Oct-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: qom: add object creation functionality

The basic object lifecycle test can now be implemented using safe code!

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzi

rust: qom: add object creation functionality

The basic object lifecycle test can now be implemented using safe code!

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/qemu/.gitlab-ci.d/cirrus.yml
/qemu/.gitlab-ci.d/cirrus/build.yml
/qemu/.gitlab-ci.d/crossbuilds.yml
/qemu/MAINTAINERS
/qemu/accel/tcg/meson.build
/qemu/audio/audio-hmp-cmds.c
/qemu/audio/audio.c
/qemu/authz/listfile.c
/qemu/backends/cryptodev-hmp-cmds.c
/qemu/backends/iommufd.c
/qemu/block.c
/qemu/block/blkdebug.c
/qemu/block/blkio.c
/qemu/block/blklogwrites.c
/qemu/block/blkverify.c
/qemu/block/block-backend.c
/qemu/block/copy-before-write.c
/qemu/block/copy-on-read.c
/qemu/block/curl.c
/qemu/block/export/export.c
/qemu/block/file-posix.c
/qemu/block/file-win32.c
/qemu/block/gluster.c
/qemu/block/iscsi.c
/qemu/block/monitor/block-hmp-cmds.c
/qemu/block/nbd.c
/qemu/block/nfs.c
/qemu/block/null.c
/qemu/block/nvme.c
/qemu/block/parallels.c
/qemu/block/qapi-system.c
/qemu/block/qapi.c
/qemu/block/qcow.c
/qemu/block/qcow2.c
/qemu/block/qed.c
/qemu/block/quorum.c
/qemu/block/rbd.c
/qemu/block/replication.c
/qemu/block/snapshot.c
/qemu/block/ssh.c
/qemu/block/stream.c
/qemu/block/vhdx.c
/qemu/block/vmdk.c
/qemu/block/vpc.c
/qemu/block/vvfat.c
/qemu/blockdev-nbd.c
/qemu/blockdev.c
/qemu/blockjob.c
/qemu/bsd-user/main.c
/qemu/bsd-user/signal-common.h
/qemu/bsd-user/signal.c
/qemu/chardev/char-hmp-cmds.c
/qemu/configs/targets/aarch64-bsd-user.mak
/qemu/configs/targets/aarch64-linux-user.mak
/qemu/configs/targets/aarch64-softmmu.mak
/qemu/configs/targets/aarch64_be-linux-user.mak
/qemu/configs/targets/alpha-linux-user.mak
/qemu/configs/targets/alpha-softmmu.mak
/qemu/configs/targets/arm-bsd-user.mak
/qemu/configs/targets/arm-linux-user.mak
/qemu/configs/targets/arm-softmmu.mak
/qemu/configs/targets/armeb-linux-user.mak
/qemu/configs/targets/avr-softmmu.mak
/qemu/configs/targets/hexagon-linux-user.mak
/qemu/configs/targets/hppa-linux-user.mak
/qemu/configs/targets/hppa-softmmu.mak
/qemu/configs/targets/i386-bsd-user.mak
/qemu/configs/targets/i386-linux-user.mak
/qemu/configs/targets/i386-softmmu.mak
/qemu/configs/targets/loongarch64-linux-user.mak
/qemu/configs/targets/loongarch64-softmmu.mak
/qemu/configs/targets/m68k-linux-user.mak
/qemu/configs/targets/m68k-softmmu.mak
/qemu/configs/targets/microblaze-linux-user.mak
/qemu/configs/targets/microblaze-softmmu.mak
/qemu/configs/targets/microblazeel-linux-user.mak
/qemu/configs/targets/microblazeel-softmmu.mak
/qemu/configs/targets/mips-linux-user.mak
/qemu/configs/targets/mips-softmmu.mak
/qemu/configs/targets/mips64-linux-user.mak
/qemu/configs/targets/mips64-softmmu.mak
/qemu/configs/targets/mips64el-linux-user.mak
/qemu/configs/targets/mips64el-softmmu.mak
/qemu/configs/targets/mipsel-linux-user.mak
/qemu/configs/targets/mipsel-softmmu.mak
/qemu/configs/targets/mipsn32-linux-user.mak
/qemu/configs/targets/mipsn32el-linux-user.mak
/qemu/configs/targets/or1k-linux-user.mak
/qemu/configs/targets/or1k-softmmu.mak
/qemu/configs/targets/ppc-linux-user.mak
/qemu/configs/targets/ppc-softmmu.mak
/qemu/configs/targets/ppc64-linux-user.mak
/qemu/configs/targets/ppc64-softmmu.mak
/qemu/configs/targets/ppc64le-linux-user.mak
/qemu/configs/targets/riscv32-linux-user.mak
/qemu/configs/targets/riscv32-softmmu.mak
/qemu/configs/targets/riscv64-bsd-user.mak
/qemu/configs/targets/riscv64-linux-user.mak
/qemu/configs/targets/riscv64-softmmu.mak
/qemu/configs/targets/rx-softmmu.mak
/qemu/configs/targets/s390x-linux-user.mak
/qemu/configs/targets/s390x-softmmu.mak
/qemu/configs/targets/sh4-linux-user.mak
/qemu/configs/targets/sh4-softmmu.mak
/qemu/configs/targets/sh4eb-linux-user.mak
/qemu/configs/targets/sh4eb-softmmu.mak
/qemu/configs/targets/sparc-linux-user.mak
/qemu/configs/targets/sparc-softmmu.mak
/qemu/configs/targets/sparc32plus-linux-user.mak
/qemu/configs/targets/sparc64-linux-user.mak
/qemu/configs/targets/sparc64-softmmu.mak
/qemu/configs/targets/tricore-softmmu.mak
/qemu/configs/targets/x86_64-bsd-user.mak
/qemu/configs/targets/x86_64-linux-user.mak
/qemu/configs/targets/x86_64-softmmu.mak
/qemu/configs/targets/xtensa-linux-user.mak
/qemu/configs/targets/xtensa-softmmu.mak
/qemu/configs/targets/xtensaeb-linux-user.mak
/qemu/configs/targets/xtensaeb-softmmu.mak
/qemu/docs/about/deprecated.rst
/qemu/docs/devel/qapi-code-gen.rst
/qemu/docs/devel/rust.rst
/qemu/docs/system/arm/emulation.rst
/qemu/docs/tools/qemu-nbd.rst
/qemu/docs/user/main.rst
/qemu/dump/dump-hmp-cmds.c
/qemu/fpu/softfloat-parts.c.inc
/qemu/fpu/softfloat.c
/qemu/gdbstub/user.c
/qemu/hw/9pfs/9p-local.c
/qemu/hw/9pfs/9p-util-generic.c
/qemu/hw/9pfs/9p-util.h
/qemu/hw/9pfs/9p.c
/qemu/hw/9pfs/meson.build
/qemu/hw/9pfs/trace-events
/qemu/hw/arm/aspeed_ast27x0.c
/qemu/hw/arm/boot.c
/qemu/hw/arm/fsl-imx6.c
/qemu/hw/arm/fsl-imx6ul.c
/qemu/hw/arm/fsl-imx7.c
/qemu/hw/arm/mps2-tz.c
/qemu/hw/arm/mps2.c
/qemu/hw/arm/mps3r.c
/qemu/hw/arm/sbsa-ref.c
/qemu/hw/arm/stellaris.c
/qemu/hw/arm/vexpress.c
/qemu/hw/arm/virt.c
/qemu/hw/arm/xlnx-versal.c
/qemu/hw/block/virtio-blk.c
/qemu/hw/block/xen-block.c
/qemu/hw/char/Kconfig
/qemu/hw/char/diva-gsp.c
/qemu/hw/char/meson.build
/qemu/hw/core/machine-hmp-cmds.c
/qemu/hw/core/machine-qmp-cmds.c
/qemu/hw/core/qdev-properties.c
/qemu/hw/core/qdev.c
/qemu/hw/cpu/a15mpcore.c
/qemu/hw/cpu/a9mpcore.c
/qemu/hw/cpu/arm11mpcore.c
/qemu/hw/cpu/realview_mpcore.c
/qemu/hw/display/artist.c
/qemu/hw/hppa/Kconfig
/qemu/hw/hppa/machine.c
/qemu/hw/hyperv/hv-balloon.c
/qemu/hw/i386/acpi-build.c
/qemu/hw/i386/kvm/xen_evtchn.c
/qemu/hw/i386/monitor.c
/qemu/hw/i386/pc.c
/qemu/hw/loongarch/meson.build
/qemu/hw/loongarch/virt-acpi-build.c
/qemu/hw/loongarch/virt-fdt-build.c
/qemu/hw/loongarch/virt.c
/qemu/hw/net/cadence_gem.c
/qemu/hw/net/rocker/rocker-hmp-cmds.c
/qemu/hw/net/virtio-net.c
/qemu/hw/net/xen_nic.c
/qemu/hw/pci-host/astro.c
/qemu/hw/pci/pci-hmp-cmds.c
/qemu/hw/ppc/pegasos2.c
/qemu/hw/ppc/spapr_drc.c
/qemu/hw/ppc/spapr_rtas.c
/qemu/hw/riscv/riscv_hart.c
/qemu/hw/rx/rx62n.c
/qemu/hw/s390x/s390-skeys.c
/qemu/hw/s390x/s390-stattrib.c
/qemu/hw/scsi/virtio-scsi.c
/qemu/hw/usb/xen-usb.c
/qemu/hw/vfio/common.c
/qemu/hw/vfio/container.c
/qemu/hw/vfio/helpers.c
/qemu/hw/vfio/igd.c
/qemu/hw/vfio/iommufd.c
/qemu/hw/vfio/pci-quirks.c
/qemu/hw/vfio/pci-quirks.h
/qemu/hw/vfio/pci.c
/qemu/hw/virtio/virtio-hmp-cmds.c
/qemu/hw/virtio/virtio-qmp.c
/qemu/hw/xen/xen-bus.c
/qemu/include/block/block-common.h
/qemu/include/block/block-global-state.h
/qemu/include/block/export.h
/qemu/include/block/nbd.h
/qemu/include/block/qdict.h
/qemu/include/fpu/softfloat-helpers.h
/qemu/include/fpu/softfloat-types.h
/qemu/include/hw/arm/boot.h
/qemu/include/hw/loongarch/virt.h
/qemu/include/hw/pci-host/astro.h
/qemu/include/hw/vfio/vfio-common.h
/qemu/include/qapi/compat-policy.h
/qemu/include/qapi/error.h
/qemu/include/qapi/qmp-registry.h
/qemu/include/qapi/util.h
/qemu/include/qapi/visitor-impl.h
/qemu/include/qapi/visitor.h
/qemu/include/qemu/osdep.h
/qemu/include/qobject/json-parser.h
/qemu/include/qobject/json-writer.h
/qemu/include/qobject/qbool.h
/qemu/include/qobject/qdict.h
/qemu/include/qobject/qjson.h
/qemu/include/qobject/qlist.h
/qemu/include/qobject/qlit.h
/qemu/include/qobject/qnull.h
/qemu/include/qobject/qnum.h
/qemu/include/qobject/qobject.h
/qemu/include/qobject/qstring.h
/qemu/include/system/block-backend-io.h
/qemu/include/system/qtest.h
/qemu/include/user/signal.h
/qemu/linux-user/main.c
/qemu/linux-user/signal-common.h
/qemu/linux-user/signal.c
/qemu/linux-user/syscall.c
/qemu/meson.build
/qemu/migration/block-active.c
/qemu/migration/dirtyrate.c
/qemu/migration/migration-hmp-cmds.c
/qemu/migration/migration.c
/qemu/migration/migration.h
/qemu/migration/options.c
/qemu/migration/vmstate.c
/qemu/monitor/hmp-cmds-target.c
/qemu/monitor/hmp-cmds.c
/qemu/monitor/hmp.c
/qemu/monitor/monitor-internal.h
/qemu/monitor/monitor.c
/qemu/monitor/qemu-config-qmp.c
/qemu/monitor/qmp.c
/qemu/nbd/server.c
/qemu/net/net-hmp-cmds.c
/qemu/net/net.c
/qemu/net/slirp.c
/qemu/qapi/block-core.json
/qemu/qapi/block-export.json
/qemu/qapi/cxl.json
/qemu/qapi/qapi-clone-visitor.c
/qemu/qapi/qapi-dealloc-visitor.c
/qemu/qapi/qapi-forward-visitor.c
/qemu/qapi/qapi-util.c
/qemu/qapi/qapi-visit-core.c
/qemu/qapi/qmp-dispatch.c
/qemu/qapi/qmp-event.c
/qemu/qapi/qmp-registry.c
/qemu/qapi/qobject-input-visitor.c
/qemu/qapi/qobject-output-visitor.c
/qemu/qapi/string-input-visitor.c
/qemu/qapi/ui.json
/qemu/qemu-img.c
/qemu/qemu-io-cmds.c
/qemu/qemu-io.c
/qemu/qemu-nbd.c
/qemu/qemu-options.hx
/qemu/qga/guest-agent-core.h
/qemu/qga/main.c
/qemu/qobject/block-qdict.c
/qemu/qobject/json-parser-int.h
/qemu/qobject/json-parser.c
/qemu/qobject/json-writer.c
/qemu/qobject/qbool.c
/qemu/qobject/qdict.c
/qemu/qobject/qjson.c
/qemu/qobject/qlist.c
/qemu/qobject/qlit.c
/qemu/qobject/qnull.c
/qemu/qobject/qnum.c
/qemu/qobject/qobject-internal.h
/qemu/qobject/qobject.c
/qemu/qobject/qstring.c
/qemu/qom/object.c
/qemu/qom/object_interfaces.c
/qemu/qom/qom-hmp-cmds.c
/qemu/qom/qom-qmp-cmds.c
/qemu/replay/replay-debugging.c
/qemu/replay/replay-snapshot.c
/qemu/roms/seabios-hppa
/qemu/rust/Cargo.toml
pl011/src/device.rs
/qemu/rust/qemu-api/src/lib.rs
/qemu/rust/qemu-api/src/prelude.rs
/qemu/rust/qemu-api/src/qom.rs
/qemu/rust/qemu-api/src/vmstate.rs
/qemu/rust/qemu-api/tests/tests.rs
/qemu/scripts/qapi/commands.py
/qemu/scripts/qapi/events.py
/qemu/scripts/qapi/features.py
/qemu/scripts/qapi/gen.py
/qemu/scripts/qapi/introspect.py
/qemu/scripts/qapi/main.py
/qemu/scripts/qapi/schema.py
/qemu/scripts/qapi/types.py
/qemu/scripts/qapi/visit.py
/qemu/scripts/qemu-gdb.py
/qemu/scripts/qemugdb/coroutine.py
/qemu/scsi/qemu-pr-helper.c
/qemu/stats/stats-hmp-cmds.c
/qemu/storage-daemon/qemu-storage-daemon.c
/qemu/stubs/meson.build
/qemu/stubs/monitor-fd.c
/qemu/stubs/qmp-command-available.c
/qemu/stubs/qmp-quit.c
/qemu/system/device_tree.c
/qemu/system/dirtylimit.c
/qemu/system/qdev-monitor.c
/qemu/system/qtest.c
/qemu/system/runstate-hmp-cmds.c
/qemu/system/vl.c
/qemu/target/alpha/cpu-param.h
/qemu/target/alpha/cpu.c
/qemu/target/alpha/fpu_helper.c
/qemu/target/arm/arm-qmp-cmds.c
/qemu/target/arm/cpu-features.h
/qemu/target/arm/cpu-param.h
/qemu/target/arm/cpu.c
/qemu/target/arm/cpu.h
/qemu/target/arm/helper.c
/qemu/target/arm/helper.h
/qemu/target/arm/internals.h
/qemu/target/arm/tcg/cpu32.c
/qemu/target/arm/tcg/cpu64.c
/qemu/target/arm/tcg/helper-a64.c
/qemu/target/arm/tcg/helper-a64.h
/qemu/target/arm/tcg/helper-sve.h
/qemu/target/arm/tcg/hflags.c
/qemu/target/arm/tcg/mve_helper.c
/qemu/target/arm/tcg/sme_helper.c
/qemu/target/arm/tcg/sve_helper.c
/qemu/target/arm/tcg/translate-a64.c
/qemu/target/arm/tcg/translate-a64.h
/qemu/target/arm/tcg/translate-sve.c
/qemu/target/arm/tcg/translate.h
/qemu/target/arm/tcg/vec_helper.c
/qemu/target/arm/tcg/vec_internal.h
/qemu/target/arm/vfp_helper.c
/qemu/target/avr/cpu-param.h
/qemu/target/hexagon/cpu-param.h
/qemu/target/hppa/cpu-param.h
/qemu/target/hppa/fpu_helper.c
/qemu/target/i386/cpu-apic.c
/qemu/target/i386/cpu-param.h
/qemu/target/i386/cpu-system.c
/qemu/target/i386/monitor.c
/qemu/target/i386/tcg/fpu_helper.c
/qemu/target/loongarch/cpu-param.h
/qemu/target/loongarch/cpu.h
/qemu/target/loongarch/loongarch-qmp-cmds.c
/qemu/target/m68k/cpu-param.h
/qemu/target/microblaze/cpu-param.h
/qemu/target/mips/cpu-param.h
/qemu/target/mips/fpu_helper.h
/qemu/target/mips/msa.c
/qemu/target/openrisc/cpu-param.h
/qemu/target/ppc/cpu-param.h
/qemu/target/ppc/cpu_init.c
/qemu/target/riscv/cpu-param.h
/qemu/target/riscv/riscv-qmp-cmds.c
/qemu/target/rx/cpu-param.h
/qemu/target/rx/cpu.c
/qemu/target/s390x/cpu-param.h
/qemu/target/s390x/cpu_models_system.c
/qemu/target/sh4/cpu-param.h
/qemu/target/sh4/cpu.c
/qemu/target/sparc/cpu-param.h
/qemu/target/tricore/cpu-param.h
/qemu/target/tricore/helper.c
/qemu/target/xtensa/cpu-param.h
/qemu/tests/docker/Makefile.include
/qemu/tests/docker/test-rust
/qemu/tests/fp/fp-bench.c
/qemu/tests/functional/meson.build
/qemu/tests/functional/test_aarch64_virt.py
/qemu/tests/functional/test_aarch64_xen.py
/qemu/tests/functional/test_ppc_sam460ex.py
/qemu/tests/functional/test_x86_64_hotplug_blk.py
/qemu/tests/guest-debug/run-test.py
/qemu/tests/meson.build
/qemu/tests/qapi-schema/features-too-many.err
/qemu/tests/qapi-schema/features-too-many.json
/qemu/tests/qapi-schema/features-too-many.out
/qemu/tests/qapi-schema/meson.build
/qemu/tests/qemu-iotests/041
/qemu/tests/qemu-iotests/165
/qemu/tests/qemu-iotests/184.out
/qemu/tests/qemu-iotests/191.out
/qemu/tests/qemu-iotests/273.out
/qemu/tests/qemu-iotests/iotests.py
/qemu/tests/qemu-iotests/tests/copy-before-write
/qemu/tests/qemu-iotests/tests/inactive-node-nbd
/qemu/tests/qemu-iotests/tests/inactive-node-nbd.out
/qemu/tests/qemu-iotests/tests/migrate-bitmaps-test
/qemu/tests/qemu-iotests/tests/qsd-migrate
/qemu/tests/qemu-iotests/tests/qsd-migrate.out
/qemu/tests/qtest/adm1266-test.c
/qemu/tests/qtest/adm1272-test.c
/qemu/tests/qtest/ahci-test.c
/qemu/tests/qtest/arm-cpu-features.c
/qemu/tests/qtest/aspeed_gpio-test.c
/qemu/tests/qtest/ast2700-gpio-test.c
/qemu/tests/qtest/boot-order-test.c
/qemu/tests/qtest/cdrom-test.c
/qemu/tests/qtest/cpu-plug-test.c
/qemu/tests/qtest/device-introspect-test.c
/qemu/tests/qtest/device-plug-test.c
/qemu/tests/qtest/drive_del-test.c
/qemu/tests/qtest/emc141x-test.c
/qemu/tests/qtest/fdc-test.c
/qemu/tests/qtest/hd-geo-test.c
/qemu/tests/qtest/ide-test.c
/qemu/tests/qtest/isl_pmbus_vr-test.c
/qemu/tests/qtest/libqmp.c
/qemu/tests/qtest/libqmp.h
/qemu/tests/qtest/libqos/generic-pcihost.c
/qemu/tests/qtest/libqos/libqos.c
/qemu/tests/qtest/libqos/pci-pc.c
/qemu/tests/qtest/libqos/qos_external.c
/qemu/tests/qtest/libqos/virtio-pci-modern.c
/qemu/tests/qtest/libqos/virtio-pci.c
/qemu/tests/qtest/libqtest.c
/qemu/tests/qtest/libqtest.h
/qemu/tests/qtest/lsm303dlhc-mag-test.c
/qemu/tests/qtest/machine-none-test.c
/qemu/tests/qtest/max34451-test.c
/qemu/tests/qtest/meson.build
/qemu/tests/qtest/migration-helpers.c
/qemu/tests/qtest/migration-test.c
/qemu/tests/qtest/migration/compression-tests.c
/qemu/tests/qtest/migration/cpr-tests.c
/qemu/tests/qtest/migration/file-tests.c
/qemu/tests/qtest/migration/framework.c
/qemu/tests/qtest/migration/framework.h
/qemu/tests/qtest/migration/migration-qmp.c
/qemu/tests/qtest/migration/migration-util.c
/qemu/tests/qtest/migration/misc-tests.c
/qemu/tests/qtest/migration/postcopy-tests.c
/qemu/tests/qtest/migration/precopy-tests.c
/qemu/tests/qtest/migration/tls-tests.c
/qemu/tests/qtest/netdev-socket.c
/qemu/tests/qtest/npcm7xx_adc-test.c
/qemu/tests/qtest/npcm7xx_emc-test.c
/qemu/tests/qtest/npcm7xx_pwm-test.c
/qemu/tests/qtest/npcm7xx_timer-test.c
/qemu/tests/qtest/npcm7xx_watchdog_timer-test.c
/qemu/tests/qtest/numa-test.c
/qemu/tests/qtest/pvpanic-pci-test.c
/qemu/tests/qtest/pvpanic-test.c
/qemu/tests/qtest/q35-test.c
/qemu/tests/qtest/qmp-cmd-test.c
/qemu/tests/qtest/qmp-test.c
/qemu/tests/qtest/qom-test.c
/qemu/tests/qtest/qos-test.c
/qemu/tests/qtest/readconfig-test.c
/qemu/tests/qtest/tco-test.c
/qemu/tests/qtest/test-filter-mirror.c
/qemu/tests/qtest/test-filter-redirector.c
/qemu/tests/qtest/test-netfilter.c
/qemu/tests/qtest/test-x86-cpuid-compat.c
/qemu/tests/qtest/tmp105-test.c
/qemu/tests/qtest/tpm-emu.c
/qemu/tests/qtest/tpm-util.c
/qemu/tests/qtest/vhost-user-test.c
/qemu/tests/qtest/virtio-net-failover.c
/qemu/tests/qtest/virtio-net-test.c
/qemu/tests/qtest/vmgenid-test.c
/qemu/tests/qtest/wdt_ib700-test.c
/qemu/tests/tcg/arm/Makefile.target
/qemu/tests/tcg/arm/README
/qemu/tests/tcg/multiarch/Makefile.target
/qemu/tests/tcg/multiarch/gdbstub/late-attach.py
/qemu/tests/tcg/multiarch/late-attach.c
/qemu/tests/unit/check-block-qdict.c
/qemu/tests/unit/check-qdict.c
/qemu/tests/unit/check-qjson.c
/qemu/tests/unit/check-qlist.c
/qemu/tests/unit/check-qlit.c
/qemu/tests/unit/check-qnull.c
/qemu/tests/unit/check-qnum.c
/qemu/tests/unit/check-qobject.c
/qemu/tests/unit/check-qom-proplist.c
/qemu/tests/unit/check-qstring.c
/qemu/tests/unit/test-block-iothread.c
/qemu/tests/unit/test-blockjob-txn.c
/qemu/tests/unit/test-blockjob.c
/qemu/tests/unit/test-char.c
/qemu/tests/unit/test-forward-visitor.c
/qemu/tests/unit/test-image-locking.c
/qemu/tests/unit/test-keyval.c
/qemu/tests/unit/test-qemu-opts.c
/qemu/tests/unit/test-qga.c
/qemu/tests/unit/test-qmp-cmds.c
/qemu/tests/unit/test-qmp-event.c
/qemu/tests/unit/test-qobject-input-visitor.c
/qemu/tests/unit/test-qobject-output-visitor.c
/qemu/tests/unit/test-replication.c
/qemu/tests/unit/test-visitor-serialization.c
/qemu/trace/trace-hmp-cmds.c
/qemu/ui/ui-hmp-cmds.c
/qemu/util/error.c
/qemu/util/keyval.c
/qemu/util/meson.build
/qemu/util/oslib-posix.c
/qemu/util/qemu-config.c
/qemu/util/qemu-option.c
/qemu/util/qemu-timer.c
9955093b07-Feb-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: use default set of lints

Being the first crate added to QEMU, pl011 has a rather restrictive
Clippy setup. This can be sometimes a bit too heavy on its suggestions,
for example

error:

rust: pl011: use default set of lints

Being the first crate added to QEMU, pl011 has a rather restrictive
Clippy setup. This can be sometimes a bit too heavy on its suggestions,
for example

error: this could be a `const fn`
--> hw/char/pl011/src/device.rs:382:5
|
382 | / fn set_read_trigger(&mut self) {
383 | | self.read_trigger = 1;
384 | | }
| |_____^

Just use the standard set that is present in rust/Cargo.toml, with
just a small adjustment to allow upper case acronyms which are used
for register names.

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

669fab6a27-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: include rust_version in Cargo.toml

Tell clippy the minimum supported Rust version for QEMU.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

f261378927-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: remove unnecessary Cargo.toml metadata

Some items of Cargo.toml (readme, homepage, repository) are
only present because of clippy::cargo warnings being enabled in
rust/hw/char/pl011/src/lib.rs

rust: remove unnecessary Cargo.toml metadata

Some items of Cargo.toml (readme, homepage, repository) are
only present because of clippy::cargo warnings being enabled in
rust/hw/char/pl011/src/lib.rs. But these items are not
particularly useful and would be all the same for all Cargo.toml
files in the QEMU workspace. Clean them up.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/qemu/.gitlab-ci.d/buildtest-template.yml
/qemu/MAINTAINERS
/qemu/accel/tcg/cpu-exec.c
/qemu/accel/tcg/internal-target.h
/qemu/accel/tcg/translate-all.c
/qemu/accel/tcg/vcpu-state.h
/qemu/audio/dbusaudio.c
/qemu/backends/hostmem-epc.c
/qemu/backends/hostmem-file.c
/qemu/backends/hostmem-memfd.c
/qemu/backends/hostmem-ram.c
/qemu/backends/hostmem-shm.c
/qemu/block/parallels.c
/qemu/block/vvfat.c
/qemu/chardev/char-hub.c
/qemu/chardev/char-pty.c
/qemu/chardev/char.c
/qemu/chardev/chardev-internal.h
/qemu/chardev/meson.build
/qemu/contrib/plugins/cache.c
/qemu/crypto/pbkdf.c
/qemu/disas/hppa.c
/qemu/disas/riscv.c
/qemu/docs/devel/migration/CPR.rst
/qemu/docs/devel/tcg-ops.rst
/qemu/docs/devel/testing/functional.rst
/qemu/docs/system/arm/aspeed.rst
/qemu/fpu/softfloat-parts.c.inc
/qemu/fpu/softfloat.c
/qemu/gdbstub/user-target.c
/qemu/host/include/riscv/host/cpuinfo.h
/qemu/hw/alpha/dp264.c
/qemu/hw/arm/Kconfig
/qemu/hw/arm/armv7m.c
/qemu/hw/arm/aspeed.c
/qemu/hw/arm/aspeed_ast27x0.c
/qemu/hw/arm/b-l475e-iot01a.c
/qemu/hw/arm/boot.c
/qemu/hw/arm/fsl-imx6.c
/qemu/hw/arm/fsl-imx7.c
/qemu/hw/arm/microbit.c
/qemu/hw/arm/mps2-tz.c
/qemu/hw/arm/mps2.c
/qemu/hw/arm/msf2-som.c
/qemu/hw/arm/musca.c
/qemu/hw/arm/netduino2.c
/qemu/hw/arm/netduinoplus2.c
/qemu/hw/arm/nrf51_soc.c
/qemu/hw/arm/olimex-stm32-h405.c
/qemu/hw/arm/omap1.c
/qemu/hw/arm/stellaris.c
/qemu/hw/arm/stm32vldiscovery.c
/qemu/hw/avr/boot.c
/qemu/hw/char/Kconfig
/qemu/hw/char/imx_serial.c
/qemu/hw/char/ipoctal232.c
/qemu/hw/char/meson.build
/qemu/hw/char/serial-pci-multi.c
/qemu/hw/core/generic-loader.c
/qemu/hw/core/irq.c
/qemu/hw/core/loader.c
/qemu/hw/core/machine.c
/qemu/hw/hppa/hppa_hardware.h
/qemu/hw/hppa/machine.c
/qemu/hw/i386/multiboot.c
/qemu/hw/i386/x86-common.c
/qemu/hw/ipack/Kconfig
/qemu/hw/ipack/ipack.c
/qemu/hw/ipack/meson.build
/qemu/hw/ipack/tpci200.c
/qemu/hw/loongarch/boot.c
/qemu/hw/m68k/an5206.c
/qemu/hw/m68k/mcf5208.c
/qemu/hw/m68k/q800.c
/qemu/hw/m68k/virt.c
/qemu/hw/microblaze/boot.c
/qemu/hw/mips/boston.c
/qemu/hw/mips/fuloong2e.c
/qemu/hw/mips/loongson3_bootp.c
/qemu/hw/mips/loongson3_bootp.h
/qemu/hw/mips/loongson3_virt.c
/qemu/hw/mips/malta.c
/qemu/hw/mips/meson.build
/qemu/hw/mips/mipssim.c
/qemu/hw/misc/i2c-echo.c
/qemu/hw/misc/ivshmem-flat.c
/qemu/hw/misc/trace-events
/qemu/hw/openrisc/boot.c
/qemu/hw/pci-host/designware.c
/qemu/hw/pci-host/raven.c
/qemu/hw/ppc/e500.c
/qemu/hw/ppc/mac_newworld.c
/qemu/hw/ppc/mac_oldworld.c
/qemu/hw/ppc/pegasos2.c
/qemu/hw/ppc/ppc405_boards.c
/qemu/hw/ppc/ppc440_bamboo.c
/qemu/hw/ppc/sam460ex.c
/qemu/hw/ppc/spapr.c
/qemu/hw/ppc/virtex_ml507.c
/qemu/hw/riscv/boot.c
/qemu/hw/rx/rx-gdbsim.c
/qemu/hw/s390x/ipl.c
/qemu/hw/s390x/s390-virtio-ccw.c
/qemu/hw/sd/omap_mmc.c
/qemu/hw/sd/sd.c
/qemu/hw/sd/sdhci.c
/qemu/hw/sh4/r2d.c
/qemu/hw/sparc/leon3.c
/qemu/hw/sparc/sun4m.c
/qemu/hw/sparc64/sun4u.c
/qemu/hw/timer/aspeed_timer.c
/qemu/hw/timer/trace-events
/qemu/hw/tricore/triboard.c
/qemu/hw/tricore/tricore_testboard.c
/qemu/hw/usb/canokey.c
/qemu/hw/usb/canokey.h
/qemu/hw/usb/hcd-ehci.c
/qemu/hw/virtio/virtio-balloon-pci.c
/qemu/hw/virtio/virtio-mem-pci.c
/qemu/hw/watchdog/wdt_aspeed.c
/qemu/hw/xtensa/sim.c
/qemu/hw/xtensa/xtfpga.c
/qemu/include/chardev/char.h
/qemu/include/exec/memory.h
/qemu/include/exec/ram_addr.h
/qemu/include/fpu/softfloat-helpers.h
/qemu/include/fpu/softfloat-types.h
/qemu/include/hw/arm/aspeed.h
/qemu/include/hw/arm/fsl-imx6.h
/qemu/include/hw/arm/fsl-imx7.h
/qemu/include/hw/arm/nrf51_soc.h
/qemu/include/hw/arm/omap.h
/qemu/include/hw/boards.h
/qemu/include/hw/char/imx_serial.h
/qemu/include/hw/i386/pc.h
/qemu/include/hw/ipack/ipack.h
/qemu/include/hw/irq.h
/qemu/include/hw/loader.h
/qemu/include/hw/misc/ivshmem-flat.h
/qemu/include/hw/pci-host/designware.h
/qemu/include/hw/sd/sd.h
/qemu/include/hw/sd/sdhci.h
/qemu/include/hw/timer/aspeed_timer.h
/qemu/include/migration/cpr.h
/qemu/include/migration/misc.h
/qemu/include/migration/vmstate.h
/qemu/include/qemu/osdep.h
/qemu/include/tcg/tcg-opc.h
/qemu/include/tcg/tcg.h
/qemu/linux-user/fd-trans.c
/qemu/linux-user/sparc/target_proc.h
/qemu/linux-user/syscall.c
/qemu/linux-user/syscall_defs.h
/qemu/meson.build
/qemu/migration/cpr-transfer.c
/qemu/migration/cpr.c
/qemu/migration/meson.build
/qemu/migration/migration.c
/qemu/migration/migration.h
/qemu/migration/options.c
/qemu/migration/qemu-file.c
/qemu/migration/qemu-file.h
/qemu/migration/ram.c
/qemu/migration/savevm.c
/qemu/migration/savevm.h
/qemu/migration/trace-events
/qemu/migration/vmstate-types.c
/qemu/migration/vmstate.c
/qemu/net/dump.c
/qemu/net/net.c
/qemu/net/slirp.c
/qemu/pc-bios/hppa-firmware.img
/qemu/pc-bios/hppa-firmware64.img
/qemu/pc-bios/s390-ccw.img
/qemu/pc-bios/s390-ccw/bootmap.c
/qemu/pc-bios/s390-ccw/netmain.c
/qemu/pc-bios/s390-ccw/virtio-net.c
/qemu/pc-bios/s390-ccw/virtio.c
/qemu/pc-bios/s390-ccw/virtio.h
/qemu/qapi/audio.json
/qemu/qapi/char.json
/qemu/qapi/migration.json
/qemu/qemu-options.hx
/qemu/roms/seabios-hppa
pl011/Cargo.toml
pl011/src/lib.rs
/qemu/rust/qemu-api-macros/Cargo.toml
/qemu/rust/qemu-api/src/zeroable.rs
/qemu/rust/qemu-api/tests/tests.rs
/qemu/scripts/qom-cast-macro-clean-cocci-gen.py
/qemu/stubs/vmstate.c
/qemu/system/memory.c
/qemu/system/physmem.c
/qemu/system/trace-events
/qemu/system/vl.c
/qemu/target/arm/cpu.c
/qemu/target/arm/cpu.h
/qemu/target/arm/helper.c
/qemu/target/arm/tcg/helper-a64.c
/qemu/target/arm/tcg/helper-a64.h
/qemu/target/arm/tcg/sme_helper.c
/qemu/target/arm/tcg/sve_helper.c
/qemu/target/arm/tcg/translate-a64.c
/qemu/target/arm/tcg/translate-sme.c
/qemu/target/arm/tcg/translate-sve.c
/qemu/target/arm/tcg/translate-vfp.c
/qemu/target/arm/tcg/translate.c
/qemu/target/arm/tcg/translate.h
/qemu/target/arm/tcg/vec_helper.c
/qemu/target/arm/vfp_helper.c
/qemu/target/hppa/cpu.c
/qemu/target/hppa/cpu.h
/qemu/target/hppa/helper.c
/qemu/target/hppa/helper.h
/qemu/target/hppa/insns.decode
/qemu/target/hppa/int_helper.c
/qemu/target/hppa/machine.c
/qemu/target/hppa/mem_helper.c
/qemu/target/hppa/sys_helper.c
/qemu/target/hppa/translate.c
/qemu/target/i386/tcg/emit.c.inc
/qemu/target/i386/tcg/fpu_helper.c
/qemu/target/loongarch/cpu.c
/qemu/target/loongarch/csr.c
/qemu/target/loongarch/csr.h
/qemu/target/loongarch/meson.build
/qemu/target/loongarch/tcg/insn_trans/trans_privileged.c.inc
/qemu/target/loongarch/tcg/tcg_loongarch.h
/qemu/target/loongarch/tcg/translate.c
/qemu/target/m68k/fpu_helper.c
/qemu/target/m68k/semihosting-stub.c
/qemu/target/mips/tcg/msa_helper.c
/qemu/target/mips/tcg/system/semihosting-stub.c
/qemu/target/rx/op_helper.c
/qemu/target/s390x/tcg/insn-data.h.inc
/qemu/target/s390x/tcg/mem_helper.c
/qemu/target/tricore/fpu_helper.c
/qemu/target/tricore/translate.c
/qemu/tcg/aarch64/tcg-target-has.h
/qemu/tcg/aarch64/tcg-target-mo.h
/qemu/tcg/aarch64/tcg-target-opc.h.inc
/qemu/tcg/aarch64/tcg-target.c.inc
/qemu/tcg/aarch64/tcg-target.h
/qemu/tcg/arm/tcg-target-has.h
/qemu/tcg/arm/tcg-target-mo.h
/qemu/tcg/arm/tcg-target-opc.h.inc
/qemu/tcg/arm/tcg-target.c.inc
/qemu/tcg/arm/tcg-target.h
/qemu/tcg/i386/tcg-target-has.h
/qemu/tcg/i386/tcg-target-mo.h
/qemu/tcg/i386/tcg-target-opc.h.inc
/qemu/tcg/i386/tcg-target.c.inc
/qemu/tcg/i386/tcg-target.h
/qemu/tcg/loongarch64/tcg-target-has.h
/qemu/tcg/loongarch64/tcg-target-mo.h
/qemu/tcg/loongarch64/tcg-target-opc.h.inc
/qemu/tcg/loongarch64/tcg-target.c.inc
/qemu/tcg/loongarch64/tcg-target.h
/qemu/tcg/mips/tcg-target-has.h
/qemu/tcg/mips/tcg-target-mo.h
/qemu/tcg/mips/tcg-target-opc.h.inc
/qemu/tcg/mips/tcg-target.c.inc
/qemu/tcg/mips/tcg-target.h
/qemu/tcg/optimize.c
/qemu/tcg/ppc/tcg-target-has.h
/qemu/tcg/ppc/tcg-target-mo.h
/qemu/tcg/ppc/tcg-target-opc.h.inc
/qemu/tcg/ppc/tcg-target.c.inc
/qemu/tcg/ppc/tcg-target.h
/qemu/tcg/riscv/tcg-target-has.h
/qemu/tcg/riscv/tcg-target-mo.h
/qemu/tcg/riscv/tcg-target-opc.h.inc
/qemu/tcg/riscv/tcg-target.c.inc
/qemu/tcg/riscv/tcg-target.h
/qemu/tcg/s390x/tcg-target-has.h
/qemu/tcg/s390x/tcg-target-mo.h
/qemu/tcg/s390x/tcg-target-opc.h.inc
/qemu/tcg/s390x/tcg-target.c.inc
/qemu/tcg/s390x/tcg-target.h
/qemu/tcg/sparc64/tcg-target-has.h
/qemu/tcg/sparc64/tcg-target-mo.h
/qemu/tcg/sparc64/tcg-target-opc.h.inc
/qemu/tcg/sparc64/tcg-target.c.inc
/qemu/tcg/sparc64/tcg-target.h
/qemu/tcg/tcg-common.c
/qemu/tcg/tcg-has.h
/qemu/tcg/tcg-internal.h
/qemu/tcg/tcg-op-gvec.c
/qemu/tcg/tcg-op-ldst.c
/qemu/tcg/tcg-op-vec.c
/qemu/tcg/tcg-op.c
/qemu/tcg/tcg.c
/qemu/tcg/tci.c
/qemu/tcg/tci/tcg-target-has.h
/qemu/tcg/tci/tcg-target-mo.h
/qemu/tcg/tci/tcg-target-opc.h.inc
/qemu/tcg/tci/tcg-target.c.inc
/qemu/tcg/tci/tcg-target.h
/qemu/tests/avocado/replay_kernel.py
/qemu/tests/functional/aspeed.py
/qemu/tests/functional/meson.build
/qemu/tests/functional/qemu_test/__init__.py
/qemu/tests/functional/qemu_test/decorators.py
/qemu/tests/functional/replay_kernel.py
/qemu/tests/functional/test_aarch64_aspeed.py
/qemu/tests/functional/test_aarch64_sbsaref.py
/qemu/tests/functional/test_aarch64_sbsaref_alpine.py
/qemu/tests/functional/test_aarch64_sbsaref_freebsd.py
/qemu/tests/functional/test_aarch64_tcg_plugins.py
/qemu/tests/functional/test_arm_aspeed_ast2500.py
/qemu/tests/functional/test_arm_aspeed_ast2600.py
/qemu/tests/functional/test_arm_microbit.py
/qemu/tests/functional/test_arm_quanta_gsj.py
/qemu/tests/functional/test_migration.py
/qemu/tests/functional/test_mips64el_replay.py
/qemu/tests/functional/test_mips_malta.py
/qemu/tests/functional/test_mips_replay.py
/qemu/tests/functional/test_mipsel_replay.py
/qemu/tests/functional/test_ppc64_mac99.py
/qemu/tests/functional/test_ppc_40p.py
/qemu/tests/functional/test_x86_64_kvm_xen.py
/qemu/tests/qemu-iotests/194.out
/qemu/tests/qemu-iotests/203.out
/qemu/tests/qemu-iotests/234.out
/qemu/tests/qemu-iotests/262.out
/qemu/tests/qemu-iotests/280.out
/qemu/tests/qtest/libqos/fw_cfg.c
/qemu/tests/qtest/libqos/fw_cfg.h
/qemu/tests/qtest/libqos/libqos.c
/qemu/tests/qtest/libqos/meson.build
/qemu/tests/qtest/libqos/virtio-scmi.c
/qemu/tests/qtest/libqtest.c
/qemu/tests/qtest/libqtest.h
/qemu/tests/qtest/meson.build
/qemu/tests/qtest/migration/cpr-tests.c
/qemu/tests/qtest/migration/framework.c
/qemu/tests/qtest/migration/framework.h
/qemu/tests/qtest/migration/migration-qmp.c
/qemu/tests/qtest/migration/migration-qmp.h
/qemu/tests/qtest/migration/migration-util.c
/qemu/tests/qtest/migration/misc-tests.c
/qemu/tests/qtest/migration/precopy-tests.c
/qemu/tests/qtest/vhost-user-test.c
/qemu/tests/qtest/virtio-net-failover.c
/qemu/tests/qtest/vmcoreinfo-test.c
/qemu/tests/tcg/s390x/Makefile.softmmu-target
/qemu/tests/tcg/s390x/mvc-smc.c
/qemu/tests/unit/test-char.c
/qemu/ui/dbus-console.c
/qemu/ui/dbus-display1.xml
/qemu/ui/dbus.c
/qemu/util/cpuinfo-riscv.c
/qemu/util/memfd.c
/qemu/util/oslib-posix.c
/qemu/util/oslib-win32.c
af7edb1d02-Dec-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: qdev: make reset take a shared reference

Because register reset is within a borrow_mut() call, reset
does not need anymore a mut reference to the PL011State.

Reviewed-by: Zhao Liu <zhao1.liu@

rust: qdev: make reset take a shared reference

Because register reset is within a borrow_mut() call, reset
does not need anymore a mut reference to the PL011State.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

20bcc96f17-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: drop use of ControlFlow

It is a poor match for what the code is doing, anyway.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

b3a29b3d17-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: pull device-specific code out of MemoryRegionOps callbacks

read() can now return a simple u64.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat

rust: pl011: pull device-specific code out of MemoryRegionOps callbacks

read() can now return a simple u64.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

c44818a502-Dec-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: remove duplicate definitions

Unify the "Interrupt" enum and the "INT_*" constants with a struct
that contains the bits. The "int_level" and "int_enabled" fields
could use a crate such

rust: pl011: remove duplicate definitions

Unify the "Interrupt" enum and the "INT_*" constants with a struct
that contains the bits. The "int_level" and "int_enabled" fields
could use a crate such as "bitflags".

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

a1ab4eed24-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: wrap registers with BqlRefCell

This is a step towards making memory ops use a shared reference to the
device type; it's not yet possible due to the calls to character device
functions.

rust: pl011: wrap registers with BqlRefCell

This is a step towards making memory ops use a shared reference to the
device type; it's not yet possible due to the calls to character device
functions.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

49bfe63f24-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: extract PL011Registers

Pull all the mutable fields of PL011State into a separate struct.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

ab6b6a8a24-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: pull interrupt updates out of read/write ops

qemu_irqs are not part of the vmstate, therefore they will remain in
PL011State. Update them if needed after regs_read()/regs_write().

App

rust: pl011: pull interrupt updates out of read/write ops

qemu_irqs are not part of the vmstate, therefore they will remain in
PL011State. Update them if needed after regs_read()/regs_write().

Apply #[must_use] to functions that return whether the interrupt state
could have changed, so that it's harder to forget the call to update().

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

1376127706-Dec-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: extract CharBackend receive logic into a separate function

Prepare for moving all references to the registers and the FIFO into a
separate struct.

Reviewed-by: Zhao Liu <zhao1.liu@inte

rust: pl011: extract CharBackend receive logic into a separate function

Prepare for moving all references to the registers and the FIFO into a
separate struct.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

6d314cc010-Dec-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: extract conversion to RegisterOffset

As an added bonus, this also makes the new function return u32 instead
of u64, thus factoring some casts into a single place.

Reviewed-by: Zhao Liu

rust: pl011: extract conversion to RegisterOffset

As an added bonus, this also makes the new function return u32 instead
of u64, thus factoring some casts into a single place.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

d1f27ae914-Nov-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: hide unnecessarily "pub" items from outside pl011::device

The only public interfaces for pl011 are TYPE_PL011 and pl011_create.
Remove pub from everything else.

Note: the "allow(dead_c

rust: pl011: hide unnecessarily "pub" items from outside pl011::device

The only public interfaces for pl011 are TYPE_PL011 and pl011_create.
Remove pub from everything else.

Note: the "allow(dead_code)" is removed later.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

efe5719c12-Nov-2024 Paolo Bonzini <pbonzini@redhat.com>

rust: pl011: remove unnecessary "extern crate"

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

7d05203923-Jan-2025 Paolo Bonzini <pbonzini@redhat.com>

rust: prefer NonNull::new to assertions

Do not use new_unchecked; the effect is the same, but the
code is easier to read and unsafe regions become smaller.
Likewise, NonNull::new can be used instead

rust: prefer NonNull::new to assertions

Do not use new_unchecked; the effect is the same, but the
code is easier to read and unsafe regions become smaller.
Likewise, NonNull::new can be used instead of assertion and
followed by as_ref() or as_mut() instead of dereferencing the
pointer.

Suggested-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

12345