qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/10] rust/timer/hpet: define hpet_cfg


From: Paolo Bonzini
Subject: Re: [PATCH 07/10] rust/timer/hpet: define hpet_cfg
Date: Wed, 29 Jan 2025 11:58:46 +0100
User-agent: Mozilla Thunderbird



On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu <zhao1.liu@intel.com> wrote:
@@ -5,6 +5,7 @@ edition = "2021"
 authors = ["Zhao Liu <zhao1.liu@intel.com>"]
 license = "GPL-2.0-or-later"
 description = "IA-PC High Precision Event Timer emulation in Rust"

Please add

rust-version = "1.63.0"

here.

+        // SAFETY: all accesses go through these methods, which guarantee
+        // that the accesses are protected by the BQL.
+        let fw_cfg = unsafe { &mut hpet_fw_cfg };

Clippy complains about references to static mut; use

   let mut fw_cfg = unsafe { *addr_of_mut!(hpet_fw_cfg) };

to make it happy; same below in update_hpet_cfg().

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]