mbox

[PULL,v2,00/14] Rust initial PoC + meson changes for 2024-10-07

Message ID 20241009094616.1648511-1-pbonzini@redhat.com (mailing list archive)
State New
Headers show

Pull-request

https://gitlab.com/bonzini/qemu.git tags/for-upstream

Message

Paolo Bonzini Oct. 9, 2024, 9:46 a.m. UTC
The following changes since commit b5ab62b3c0050612c7f9b0b4baeb44ebab42775a:

  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-10-04 19:28:37 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 5011e4c2aca4831204aea15223359d29af9a853e:

  gitlab-ci: add Rust-enabled CI job (2024-10-09 11:37:51 +0200)

----------------------------------------------------------------
* first commit for Rust support
* add CI job using Fedora + Rust nightly
* fix detection of ATOMIC128 on x86_64

----------------------------------------------------------------
Manos Pitsidianakis (7):
      build-sys: Add rust feature option
      rust: add bindgen step as a meson dependency
      .gitattributes: add Rust diff and merge attributes
      meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag
      rust: add crate to expose bindings and interfaces
      rust: add utility procedural macro crate
      rust: add PL011 device model

Paolo Bonzini (6):
      Require meson version 1.5.0
      configure, meson: detect Rust toolchain
      meson: define qemu_isa_flags
      meson: ensure -mcx16 is passed when detecting ATOMIC128
      dockerfiles: add a Dockerfile using a nightly Rust toolchain
      gitlab-ci: add Rust-enabled CI job

Pierrick Bouvier (1):
      meson: fix machine option for x86_version

 MAINTAINERS                                        |  21 +
 configure                                          | 170 +++++-
 meson.build                                        | 158 +++++-
 rust/wrapper.h                                     |  47 ++
 .gitattributes                                     |   3 +
 .gitlab-ci.d/buildtest.yml                         |  13 +
 .gitlab-ci.d/containers.yml                        |   6 +
 Kconfig                                            |   1 +
 Kconfig.host                                       |   3 +
 hw/arm/Kconfig                                     |  30 +-
 meson_options.txt                                  |   3 +
 python/scripts/vendor.py                           |   4 +-
 python/wheels/meson-1.2.3-py3-none-any.whl         | Bin 964928 -> 0 bytes
 python/wheels/meson-1.5.0-py3-none-any.whl         | Bin 0 -> 959846 bytes
 pythondeps.toml                                    |   2 +-
 rust/.gitignore                                    |   3 +
 rust/Kconfig                                       |   1 +
 rust/hw/Kconfig                                    |   2 +
 rust/hw/char/Kconfig                               |   3 +
 rust/hw/char/meson.build                           |   1 +
 rust/hw/char/pl011/.gitignore                      |   2 +
 rust/hw/char/pl011/Cargo.lock                      | 134 +++++
 rust/hw/char/pl011/Cargo.toml                      |  26 +
 rust/hw/char/pl011/README.md                       |  31 ++
 rust/hw/char/pl011/meson.build                     |  26 +
 rust/hw/char/pl011/src/device.rs                   | 599 +++++++++++++++++++++
 rust/hw/char/pl011/src/device_class.rs             |  70 +++
 rust/hw/char/pl011/src/lib.rs                      | 586 ++++++++++++++++++++
 rust/hw/char/pl011/src/memory_ops.rs               |  59 ++
 rust/hw/meson.build                                |   1 +
 rust/meson.build                                   |   4 +
 rust/qemu-api-macros/Cargo.lock                    |  47 ++
 rust/qemu-api-macros/Cargo.toml                    |  25 +
 rust/qemu-api-macros/README.md                     |   1 +
 rust/qemu-api-macros/meson.build                   |  25 +
 rust/qemu-api-macros/src/lib.rs                    |  43 ++
 rust/qemu-api/.gitignore                           |   2 +
 rust/qemu-api/Cargo.lock                           |   7 +
 rust/qemu-api/Cargo.toml                           |  26 +
 rust/qemu-api/README.md                            |  17 +
 rust/qemu-api/build.rs                             |  14 +
 rust/qemu-api/meson.build                          |  24 +
 rust/qemu-api/src/definitions.rs                   |  97 ++++
 rust/qemu-api/src/device_class.rs                  | 128 +++++
 rust/qemu-api/src/lib.rs                           | 166 ++++++
 rust/qemu-api/src/tests.rs                         |  49 ++
 rust/rustfmt.toml                                  |   7 +
 scripts/archive-source.sh                          |   6 +-
 scripts/make-release                               |   5 +-
 scripts/meson-buildoptions.sh                      |   3 +
 scripts/rust/rust_root_crate.sh                    |  13 +
 scripts/rust/rustc_args.py                         |  84 +++
 subprojects/.gitignore                             |  11 +
 subprojects/arbitrary-int-1-rs.wrap                |   7 +
 subprojects/bilge-0.2-rs.wrap                      |   7 +
 subprojects/bilge-impl-0.2-rs.wrap                 |   7 +
 subprojects/either-1-rs.wrap                       |   7 +
 subprojects/itertools-0.11-rs.wrap                 |   7 +
 .../packagefiles/arbitrary-int-1-rs/meson.build    |  19 +
 subprojects/packagefiles/bilge-0.2-rs/meson.build  |  29 +
 .../packagefiles/bilge-impl-0.2-rs/meson.build     |  45 ++
 subprojects/packagefiles/either-1-rs/meson.build   |  24 +
 .../packagefiles/itertools-0.11-rs/meson.build     |  30 ++
 .../packagefiles/proc-macro-error-1-rs/meson.build |  40 ++
 .../proc-macro-error-attr-1-rs/meson.build         |  32 ++
 .../packagefiles/proc-macro2-1-rs/meson.build      |  31 ++
 subprojects/packagefiles/quote-1-rs/meson.build    |  29 +
 subprojects/packagefiles/syn-2-rs/meson.build      |  40 ++
 .../packagefiles/unicode-ident-1-rs/meson.build    |  20 +
 subprojects/proc-macro-error-1-rs.wrap             |   7 +
 subprojects/proc-macro-error-attr-1-rs.wrap        |   7 +
 subprojects/proc-macro2-1-rs.wrap                  |   7 +
 subprojects/quote-1-rs.wrap                        |   7 +
 subprojects/syn-2-rs.wrap                          |   7 +
 subprojects/unicode-ident-1-rs.wrap                |   7 +
 subprojects/unicode-ident-1-rs/meson.build         |  20 +
 .../docker/dockerfiles/fedora-rust-nightly.docker  | 173 ++++++
 tests/docker/dockerfiles/opensuse-leap.docker      |   2 +-
 tests/lcitool/mappings.yml                         |   2 +-
 tests/lcitool/refresh                              |  26 +
 80 files changed, 3413 insertions(+), 35 deletions(-)
 create mode 100644 rust/wrapper.h
 delete mode 100644 python/wheels/meson-1.2.3-py3-none-any.whl
 create mode 100644 python/wheels/meson-1.5.0-py3-none-any.whl
 create mode 100644 rust/.gitignore
 create mode 100644 rust/Kconfig
 create mode 100644 rust/hw/Kconfig
 create mode 100644 rust/hw/char/Kconfig
 create mode 100644 rust/hw/char/meson.build
 create mode 100644 rust/hw/char/pl011/.gitignore
 create mode 100644 rust/hw/char/pl011/Cargo.lock
 create mode 100644 rust/hw/char/pl011/Cargo.toml
 create mode 100644 rust/hw/char/pl011/README.md
 create mode 100644 rust/hw/char/pl011/meson.build
 create mode 100644 rust/hw/char/pl011/src/device.rs
 create mode 100644 rust/hw/char/pl011/src/device_class.rs
 create mode 100644 rust/hw/char/pl011/src/lib.rs
 create mode 100644 rust/hw/char/pl011/src/memory_ops.rs
 create mode 100644 rust/hw/meson.build
 create mode 100644 rust/meson.build
 create mode 100644 rust/qemu-api-macros/Cargo.lock
 create mode 100644 rust/qemu-api-macros/Cargo.toml
 create mode 100644 rust/qemu-api-macros/README.md
 create mode 100644 rust/qemu-api-macros/meson.build
 create mode 100644 rust/qemu-api-macros/src/lib.rs
 create mode 100644 rust/qemu-api/.gitignore
 create mode 100644 rust/qemu-api/Cargo.lock
 create mode 100644 rust/qemu-api/Cargo.toml
 create mode 100644 rust/qemu-api/README.md
 create mode 100644 rust/qemu-api/build.rs
 create mode 100644 rust/qemu-api/meson.build
 create mode 100644 rust/qemu-api/src/definitions.rs
 create mode 100644 rust/qemu-api/src/device_class.rs
 create mode 100644 rust/qemu-api/src/lib.rs
 create mode 100644 rust/qemu-api/src/tests.rs
 create mode 100644 rust/rustfmt.toml
 create mode 100755 scripts/rust/rust_root_crate.sh
 create mode 100644 scripts/rust/rustc_args.py
 create mode 100644 subprojects/arbitrary-int-1-rs.wrap
 create mode 100644 subprojects/bilge-0.2-rs.wrap
 create mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 create mode 100644 subprojects/either-1-rs.wrap
 create mode 100644 subprojects/itertools-0.11-rs.wrap
 create mode 100644 subprojects/packagefiles/arbitrary-int-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/itertools-0.11-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 create mode 100644 subprojects/packagefiles/unicode-ident-1-rs/meson.build
 create mode 100644 subprojects/proc-macro-error-1-rs.wrap
 create mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 create mode 100644 subprojects/proc-macro2-1-rs.wrap
 create mode 100644 subprojects/quote-1-rs.wrap
 create mode 100644 subprojects/syn-2-rs.wrap
 create mode 100644 subprojects/unicode-ident-1-rs.wrap
 create mode 100644 subprojects/unicode-ident-1-rs/meson.build
 create mode 100644 tests/docker/dockerfiles/fedora-rust-nightly.docker

Comments

Peter Maydell Oct. 10, 2024, 1:49 p.m. UTC | #1
On Wed, 9 Oct 2024 at 10:47, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit b5ab62b3c0050612c7f9b0b4baeb44ebab42775a:
>
>   Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-10-04 19:28:37 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 5011e4c2aca4831204aea15223359d29af9a853e:
>
>   gitlab-ci: add Rust-enabled CI job (2024-10-09 11:37:51 +0200)
>
> ----------------------------------------------------------------
> * first commit for Rust support
> * add CI job using Fedora + Rust nightly
> * fix detection of ATOMIC128 on x86_64
>
> ----------------------------------------------------------------

Something about the 'subprojects' changes seems to have
broken 'make vm-build-openbsd':

make: Entering directory '/home/peter.maydell/qemu-openbsd/build'
/home/peter.maydell/qemu-openbsd/build/pyvenv/bin/meson introspect
--targets --tests --benchmarks |
/home/peter.maydell/qemu-openbsd/build/pyvenv/bin/python3 -B
scripts/mtest2make.py > Makefile.mtest
{ \
  echo 'ninja-targets = \'; \
  /usr/bin/ninja -t targets all | sed 's/:.*//; $!s/$/ \\/'; \
  echo 'build-files = \'; \
  /usr/bin/ninja -t query build.ninja | sed -n '1,/^  input:/d; /^
outputs:/q; s/$/ \\/p'; \
} > Makefile.ninja.tmp && mv Makefile.ninja.tmp Makefile.ninja
/home/peter.maydell/qemu-openbsd/build/pyvenv/bin/python3 -B
/home/peter.maydell/qemu-openbsd/tests/vm/openbsd  --debug
--genisoimage /usr/bin/genisoimage    --source-path
/home/peter.maydell/qemu-openbsd --image
"/home/peter.maydell/.cache/qemu-vm/images/openbsd.img"  --build-image
/home/peter.maydell/.cache/qemu-vm/images/openbsd.img
Image file exists, skipping build:
/home/peter.maydell/.cache/qemu-vm/images/openbsd.img
Use --force option to overwrite
/home/peter.maydell/qemu-openbsd/build/pyvenv/bin/python3 -B
/home/peter.maydell/qemu-openbsd/tests/vm/openbsd  --debug  --jobs 8
--verbose    --image
"/home/peter.maydell/.cache/qemu-vm/images/openbsd.img"  --snapshot
--build-qemu /home/peter.maydell/qemu-openbsd --
DEBUG:root:Creating archive
/home/peter.maydell/qemu-openbsd/build/vm-test-7c_u6jxf.tmp/data-993a1.tar
for src_dir dir: /home/peter.maydell/qemu-openbsd
Download keycodemapdb...
  -> Already downloaded
Download libvfio-user...
  -> Already downloaded
Download berkeley-softfloat-3...
  -> Already downloaded
Download berkeley-testfloat-3...
  -> Already downloaded
tar: subprojects/unicode-ident-1.0.12: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
failed to append subproject unicode-ident-1.0.12 to
/home/peter.maydell/qemu-openbsd/build/vm-test-7c_u6jxf.tmp/data-993a1.tar
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/peter.maydell/qemu-openbsd/tests/vm/basevm.py", line 654, in main
    vm.add_source_dir(args.build_qemu)
  File "/home/peter.maydell/qemu-openbsd/tests/vm/basevm.py", line
277, in add_source_dir
    subprocess.check_call(["./scripts/archive-source.sh", tarfile],
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command
'['./scripts/archive-source.sh',
'/home/peter.maydell/qemu-openbsd/build/vm-test-7c_u6jxf.tmp/data-993a1.tar']'
returned non-zero exit status 1.
make: *** [/home/peter.maydell/qemu-openbsd/tests/vm/Makefile.include:110:
vm-build-openbsd] Error 2
make: Leaving directory '/home/peter.maydell/qemu-openbsd/build'

thanks
-- PMM