Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: b652d512855997ec89c78aa540aceadd5af13724 https://github.com/qemu/qemu/commit/b652d512855997ec89c78aa540aceadd5af13724 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025)
Changed paths: M rust/qemu-api/src/bindings.rs Log Message: ----------- rust: bindings: allow ptr_offset_with_cast This is produced by recent versions of bindgen: warning: use of `offset` with a `usize` casted to an `isize` --> /builds/bonzini/qemu/rust/target/debug/build/qemu_api-35cb647f4db404b8/out/bindings.inc.rs:39:21 | 39 | let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(core::ptr::addr_of!((*this).storage) as *const u8).add(byte_index)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default warning: use of `offset` with a `usize` casted to an `isize` --> /builds/bonzini/qemu/rust/target/debug/build/qemu_api-35cb647f4db404b8/out/bindings.inc.rs:68:13 | 68 | (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(core::ptr::addr_of_mut!((*this).storage) as *mut u8).add(byte_index)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast This seems to be new in bindgen 0.71.0, possibly related to bindgen commit 33006185b7878 ("Add raw_ref_macros feature", 2024-11-22). Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 0074a471477d56723bd6fd044b78c30ff5958f56 https://github.com/qemu/qemu/commit/0074a471477d56723bd6fd044b78c30ff5958f56 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M configure M python/scripts/vendor.py R python/wheels/meson-1.5.0-py3-none-any.whl A python/wheels/meson-1.8.1-py3-none-any.whl M pythondeps.toml M tests/lcitool/mappings.yml Log Message: ----------- meson: update to version 1.8.1 This adds several improvements to Rust support, including native clippy and rustdoc targets, the "objects" keyword, and running doctests. Require it only when Rust support is requested, to avoid putting a strict requirement on all build platforms for the sake of an experimental feature. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 4f04a4eaf0576a5a5a1c347b63d17b4d5244c979 https://github.com/qemu/qemu/commit/4f04a4eaf0576a5a5a1c347b63d17b4d5244c979 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M docs/devel/rust.rst M rust/meson.build M rust/qemu-api/meson.build Log Message: ----------- rust: use "objects" for Rust executables as well libqemuutil is not meant be linked as a whole; if modules are enabled, doing so results in undefined symbols (corresponding to QMP commands) in rust/qemu-api/rust-qemu-api-integration. Support for "objects" in Rust executables is available in Meson 1.8.0; use it to switching to the same dependencies that C targets use: link_with for libqemuutil, and objects for everything else. Reported-by: Bernhard Beschow <shen...@gmail.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 53de966c3e8e6b9db3a81e8081be8e8275a0c6ee https://github.com/qemu/qemu/commit/53de966c3e8e6b9db3a81e8081be8e8275a0c6ee Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M configure M meson.build M tests/docker/dockerfiles/fedora-rust-nightly.docker M tests/docker/dockerfiles/ubuntu2204.docker M tests/lcitool/refresh Log Message: ----------- build, dockerfiles: add support for detecting rustdoc rustdoc is effectively a custom version of rustc, and it is necessary to specify it in order to run doctests from Meson. Add the relevant configure option and environment variables. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: f620cadc0c24ae414b46204e57a82f7bf586d2c4 https://github.com/qemu/qemu/commit/f620cadc0c24ae414b46204e57a82f7bf586d2c4 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M .gitlab-ci.d/buildtest-template.yml M .gitlab-ci.d/buildtest.yml M docs/devel/rust.rst M rust/qemu-api/meson.build Log Message: ----------- rust: add qemu-api doctests to "meson test" Doctests are weird. They are essentially integration tests, but they're "ran" by executing rustdoc --test, which takes a compiler-ish command line. This is supported by Meson 1.8.0. Because they run the linker and need all the .o files, run them in the build jobs rather than the test jobs. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 18c9f4a1729db1389218983379f6d62a9e550754 https://github.com/qemu/qemu/commit/18c9f4a1729db1389218983379f6d62a9e550754 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M rust/qemu-api/src/cell.rs Log Message: ----------- rust: cell: remove support for running doctests with "cargo test --doc" This is not needed anymore now that tests link with libqemuutil. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 2409089b87692700deb38fc0b8ac94e31b70ffc3 https://github.com/qemu/qemu/commit/2409089b87692700deb38fc0b8ac94e31b70ffc3 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: A clippy.toml M docs/devel/rust.rst M meson.build M rust/Cargo.toml R rust/clippy.toml M rust/meson.build M scripts/rust/rustc_args.py Log Message: ----------- rust: use native Meson support for clippy and rustdoc Meson has support for invoking clippy and rustdoc on all crates (1.7.0 for clippy, 1.8.0 for rustdoc). Use it instead of the homegrown version; this requires disabling the multiple_crate_versions lint (the only one that was enabled from the "cargo" group)---which was not particularly useful anyway because all dependencies are converted by hand into Meson subprojects. rustfmt is still not supported. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 0b901459a87a7fdbed36e574aae33e0635a3e9af https://github.com/qemu/qemu/commit/0b901459a87a7fdbed36e574aae33e0635a3e9af Author: Xin Li (Intel) <x...@zytor.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M target/i386/cpu.c Log Message: ----------- target/i386: Remove FRED dependency on WRMSRNS WRMSRNS doesn't become a required feature for FERD, and Linux has removed the dependency, as such remove it from Qemu. Cc: qemu-sta...@nongnu.org Signed-off-by: Xin Li (Intel) <x...@zytor.com> Reviewed-by: Xiaoyao Li <xiaoyao...@intel.com> Link: https://lore.kernel.org/r/20250103084827.1820007-2-...@zytor.com Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 99216748fd4e2b25dc0a7609e8a4fecea4c3eaf4 https://github.com/qemu/qemu/commit/99216748fd4e2b25dc0a7609e8a4fecea4c3eaf4 Author: Xin Li (Intel) <x...@zytor.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M target/i386/cpu.c M target/i386/cpu.h Log Message: ----------- target/i386: Add a new CPU feature word for CPUID.7.1.ECX The immediate form of MSR access instructions will use this new CPU feature word. Signed-off-by: Xin Li (Intel) <x...@zytor.com> Link: https://lore.kernel.org/r/20250103084827.1820007-3-...@zytor.com Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 91084f3b44b1da4935eec85b79c1f97d1c140ada https://github.com/qemu/qemu/commit/91084f3b44b1da4935eec85b79c1f97d1c140ada Author: Xin Li (Intel) <x...@zytor.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M target/i386/cpu.c M target/i386/cpu.h Log Message: ----------- target/i386: Add the immediate form MSR access instruction support The immediate form of MSR access instructions are primarily motivated by performance, not code size: by having the MSR number in an immediate, it is available *much* earlier in the pipeline, which allows the hardware much more leeway about how a particular MSR is handled. Signed-off-by: Xin Li (Intel) <x...@zytor.com> Link: https://lore.kernel.org/r/20250103084827.1820007-4-...@zytor.com Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 34d697f427d853e4cc14bb369b9134fe4b663cda https://github.com/qemu/qemu/commit/34d697f427d853e4cc14bb369b9134fe4b663cda Author: Pierrick Bouvier <pierrick.bouv...@linaro.org> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M meson.build Log Message: ----------- meson: use config_base_arch for target libraries Fixed commit introduced common dependencies for target libraries. Alas, it wrongly reused the 'target' variable, which was previously set from another loop. Thus, some dependencies were missing depending on order of target list, as found here [1]. The fix is to use the correct config_base_arch instead. Kudos to Thomas Huth who had this right, before I reimplement it, and introduce this bug. [1] https://lore.kernel.org/qemu-devel/c54469ce-0385-4aea-b345-47711e9e6...@linaro.org/ Fixes: 4fb54de823e9 (meson: build target libraries with common dependencies) Signed-off-by: Pierrick Bouvier <pierrick.bouv...@linaro.org> Reviewed-by: Thomas Huth <th...@redhat.com> Tested-by: Cédric Le Goater <c...@redhat.com> Link: https://lore.kernel.org/r/20250602233801.2699961-1-pierrick.bouv...@linaro.org Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: e7f926eb7f5b81c709313974b476ed181c9c76d5 https://github.com/qemu/qemu/commit/e7f926eb7f5b81c709313974b476ed181c9c76d5 Author: Cédric Le Goater <c...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M target/i386/kvm/tdx.c Log Message: ----------- i386/tdx: Fix build on 32-bit host Use PRI formats where required and fix pointer cast. Cc: Xiaoyao Li <xiaoyao...@intel.com> Signed-off-by: Cédric Le Goater <c...@redhat.com> Link: https://lore.kernel.org/r/20250602173101.1052983-2-...@redhat.com Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 6f1035fc65406c4e72e1dbd76e64924415edd616 https://github.com/qemu/qemu/commit/6f1035fc65406c4e72e1dbd76e64924415edd616 Author: Cédric Le Goater <c...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M hw/i386/tdvf.c Log Message: ----------- i386/tdvf: Fix build on 32-bit host Use PRI formats where required. Cc: Isaku Yamahata <isaku.yamah...@intel.com> Signed-off-by: Cédric Le Goater <c...@redhat.com> Link: https://lore.kernel.org/r/20250602173101.1052983-3-...@redhat.com Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 648fe157d33436f042d6b6434b9b88079f67fa33 https://github.com/qemu/qemu/commit/648fe157d33436f042d6b6434b9b88079f67fa33 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M rust/Cargo.lock M rust/Cargo.toml A rust/bits/Cargo.toml A rust/bits/meson.build A rust/bits/src/lib.rs M rust/meson.build A rust/qemu-api-macros/src/bits.rs M rust/qemu-api-macros/src/lib.rs Log Message: ----------- rust: add "bits", a custom bitflags implementation One common thing that device emulation does is manipulate bitmasks, for example to check whether two bitmaps have common bits. One example in the pl011 crate is the checks for pending interrupts, where an interrupt cause corresponds to at least one interrupt source from a fixed set. Unfortunately, this is one case where Rust *can* provide some kind of abstraction but it does so with a rather Perl-ish There Is More Way To Do It. It is not something where a crate like "bilge" helps, because it only covers the packing of bits in a structure; operations like "are all bits of Y set in X" almost never make sense for bit-packed structs; you need something else, there are several crates that do it and of course we're going to roll our own. In particular I examined three: - bitmask (https://docs.rs/bitmask/0.5.0/bitmask/) does not support const at all. This is a showstopper because one of the ugly things in the current pl011 code is the ugliness of code that defines interrupt masks at compile time: pub const E: Self = Self(Self::OE.0 | Self::BE.0 | Self::PE.0 | Self::FE.0); or even worse: const IRQMASK: [u32; 6] = [ Interrupt::E.0 | Interrupt::MS.0 | Interrupt::RT.0 | Interrupt::TX.0 | Interrupt::RX.0, ... } You would have to use roughly the same code---"bitmask" only helps with defining the struct. - bitmask_enum (https://docs.rs/bitmask-enum/2.2.5/bitmask_enum/) does not have a good separation of "valid" and "invalid" bits, so for example "!x" will invert all 16 bits if you choose u16 as the representation -- even if you only defined 10 bits. This makes it easier to introduce subtle bugs in comparisons. - bitflags (https://docs.rs/bitflags/2.6.0/bitflags/) is generally the most used such crate and is the one that I took most inspiration from with respect to the syntax. It's a pretty sophisticated implementation, with a lot of bells and whistles such as an implementation of "Iter" that returns the bits one at a time. The main thing that all of them lack, however, is a way to simplify the ugly definitions like the above. "bitflags" includes const methods that perform AND/OR/XOR of masks (these are necessary because Rust operator overloading does not support const yet, and therefore overloaded operators cannot be used in the definition of a "static" variable), but they become even more verbose and unmanageable, like Interrupt::E.union(Interrupt::MS).union(Interrupt::RT).union(Interrupt::TX).union(Interrupt::RX) This was the main reason to create "bits", which allows something like bits!(Interrupt: E | MS | RT | TX | RX) and expands it 1) add "Interrupt::" in front of all identifiers 2) convert operators to the wordy const functions like "union". It supports boolean operators "&", "|", "^", "!" and parentheses, with a relatively simple recursive descent parser that's implemented in qemu_api_macros. Since I don't remember exactly how the macro was developed, I cannot exclude that it contains code from "bitflags". Therefore, I am conservatively leaving in the MIT and Apache 2.0 licenses from bitflags. In fact, I think there would be a benefit in being able to push code back to "bitflags" anyway whenever applicable, so that the two libraries do not diverge too much, so that's another reason to use this. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 9c8ff2a1ed51b52ac64b80d35bdbd239b7b5d8e5 https://github.com/qemu/qemu/commit/9c8ff2a1ed51b52ac64b80d35bdbd239b7b5d8e5 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M rust/Cargo.lock M rust/hw/char/pl011/Cargo.toml M rust/hw/char/pl011/meson.build M rust/hw/char/pl011/src/device.rs M rust/hw/char/pl011/src/registers.rs Log Message: ----------- rust: pl011: use the bits macro This avoids the repeated ".0" when using the Interrupt struct. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 214518614c1ce7eb7a002452cd43a7597f90d543 https://github.com/qemu/qemu/commit/214518614c1ce7eb7a002452cd43a7597f90d543 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2025-06-03 (Tue, 03 Jun 2025) Changed paths: M rust/qemu-api-macros/src/lib.rs Log Message: ----------- rust: qemu-api-macros: add from_bits and into_bits to #[derive(TryInto)] These const functions make it possible to use enums easily together with the bitfield-struct crate. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: f8a113701dd2d28f3bedb216e59125ddcb77fd05 https://github.com/qemu/qemu/commit/f8a113701dd2d28f3bedb216e59125ddcb77fd05 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2025-06-04 (Wed, 04 Jun 2025) Changed paths: M .gitlab-ci.d/buildtest-template.yml M .gitlab-ci.d/buildtest.yml A clippy.toml M configure M docs/devel/rust.rst M hw/i386/tdvf.c M meson.build M python/scripts/vendor.py R python/wheels/meson-1.5.0-py3-none-any.whl A python/wheels/meson-1.8.1-py3-none-any.whl M pythondeps.toml M rust/Cargo.lock M rust/Cargo.toml A rust/bits/Cargo.toml A rust/bits/meson.build A rust/bits/src/lib.rs R rust/clippy.toml M rust/hw/char/pl011/Cargo.toml M rust/hw/char/pl011/meson.build M rust/hw/char/pl011/src/device.rs M rust/hw/char/pl011/src/registers.rs M rust/meson.build A rust/qemu-api-macros/src/bits.rs M rust/qemu-api-macros/src/lib.rs M rust/qemu-api/meson.build M rust/qemu-api/src/bindings.rs M rust/qemu-api/src/cell.rs M scripts/rust/rustc_args.py M target/i386/cpu.c M target/i386/cpu.h M target/i386/kvm/tdx.c M tests/docker/dockerfiles/fedora-rust-nightly.docker M tests/docker/dockerfiles/ubuntu2204.docker M tests/lcitool/mappings.yml M tests/lcitool/refresh Log Message: ----------- Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * rust: use native Meson support for clippy and rustdoc * rust: add "bits", a custom bitflags implementation * target/i386: Remove FRED dependency on WRMSRNS * target/i386: Add the immediate form MSR access instruction support * TDX fixes # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmg/XrsUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroOPIwf/VXh98Wd+7BJLkNJVFpczSF7YhJ5J # a5BcWLOdVrzEJoqvfc9lkubgpShgzYDYJH99F/FloHddkPvZ1NRB2JXtDB1O3sSC # NGaI4YM8uA/k21pt1jQtDJkk3Az7GNIBIcvi4HR5GjTOvOKGOXLpYErK52lM4GNG # Aa17/Rb9Ug+QzyuS1M+mDPFdY2X6Hore2jXsp3ZH+U8hs+khecHEPsZUZ/Nlr1Z7 # UoiYks4U29wtVJ/BCjNkgXoMJC6uqL/nOP5dLJBgboOodrtwdwpDMIUcyPLrOnjf # ugJx0zYHIVdqpdft72EvLD92bzB8WoUiPsUA/dG45gGmhzuYWDmOqSdaKg== # =l0gm # -----END PGP SIGNATURE----- # gpg: Signature made Tue 03 Jun 2025 16:44:43 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonz...@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonz...@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonz...@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: rust: qemu-api-macros: add from_bits and into_bits to #[derive(TryInto)] rust: pl011: use the bits macro rust: add "bits", a custom bitflags implementation i386/tdvf: Fix build on 32-bit host i386/tdx: Fix build on 32-bit host meson: use config_base_arch for target libraries target/i386: Add the immediate form MSR access instruction support target/i386: Add a new CPU feature word for CPUID.7.1.ECX target/i386: Remove FRED dependency on WRMSRNS rust: use native Meson support for clippy and rustdoc rust: cell: remove support for running doctests with "cargo test --doc" rust: add qemu-api doctests to "meson test" build, dockerfiles: add support for detecting rustdoc rust: use "objects" for Rust executables as well meson: update to version 1.8.1 rust: bindings: allow ptr_offset_with_cast Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Compare: https://github.com/qemu/qemu/compare/09be8a511a2e...f8a113701dd2 To unsubscribe from these emails, change your notification settings at https://github.com/qemu/qemu/settings/notifications