]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust/timer/hpet: define hpet_fw_cfg
authorZhao Liu <zhao1.liu@intel.com>
Mon, 10 Feb 2025 03:00:48 +0000 (11:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Feb 2025 11:51:34 +0000 (12:51 +0100)
commit0534248a6b515cb4dea29a6fd6c256dc77f2a953
tree58220c8a0536afd3d2370da287a9f55356b087c0
parenteadb83f9a3722045e291b6a73994004007dc4657
rust/timer/hpet: define hpet_fw_cfg

Define HPETFwEntry structure with the same memory layout as
hpet_fw_entry in C.

Further, define the global hpet_cfg variable in Rust which is the
same as the C version. This hpet_cfg variable in Rust will replace
the C version one and allows both Rust code and C code to access it.

The Rust version of hpet_cfg is self-contained, avoiding unsafe
access to C code.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250210030051.2562726-8-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/Cargo.lock
rust/Cargo.toml
rust/hw/meson.build
rust/hw/timer/hpet/Cargo.toml [new file with mode: 0644]
rust/hw/timer/hpet/meson.build [new file with mode: 0644]
rust/hw/timer/hpet/src/fw_cfg.rs [new file with mode: 0644]
rust/hw/timer/hpet/src/lib.rs [new file with mode: 0644]
rust/hw/timer/meson.build [new file with mode: 0644]
rust/qemu-api/src/zeroable.rs