mbox

[PULL,00/48] i386, rust changes for 2024-01-24

Message ID 20250124094442.13207-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 Jan. 24, 2025, 9:43 a.m. UTC
The following changes since commit d6430c17d7113d3c38480dc34e59d00b0504e2f7:

  Merge tag 'pull-riscv-to-apply-20250119-1' of https://github.com/alistair23/qemu into staging (2025-01-19 08:55:46 -0500)

are available in the Git repository at:

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

for you to fetch changes up to 9feb68638e504c91b59e745b94423e8536abfd03:

  rust: qemu-api: add sub-subclass to the integration tests (2025-01-23 19:07:39 +0100)

----------------------------------------------------------------
* target/i386: optimize string instructions
* target/i386: new Sierra Forest and Clearwater Forest models
* rust: type-safe vmstate implementation
* rust: use interior mutability for PL011
* rust: clean ups
* memtxattrs: remove usage of bitfields from MEMTXATTRS_UNSPECIFIED

----------------------------------------------------------------
Paolo Bonzini (39):
      rust: pl011: fix repr(C) for PL011Class
      target/i386: inline gen_jcc into sole caller
      target/i386: remove trailing 1 from gen_{j, cmov, set}cc1
      target/i386: unify REP and REPZ/REPNZ generation
      target/i386: unify choice between single and repeated string instructions
      target/i386: reorganize ops emitted by do_gen_rep, drop repz_opt
      target/i386: tcg: move gen_set/reset_* earlier in the file
      target/i386: fix RF handling for string instructions
      target/i386: make cc_op handling more explicit for repeated string instructions.
      target/i386: do not use gen_op_jz_ecx for repeated string operations
      target/i386: optimize CX handling in repeated string operations
      target/i386: execute multiple REP/REPZ iterations without leaving TB
      target/i386: pull computation of string update value out of loop
      target/i386: extract common bits of gen_repz/gen_repz_nz
      target/i386: avoid using s->tmp0 for add to implicit registers
      rust: vmstate: add new type safe implementation
      rust: vmstate: implement VMState for non-leaf types
      rust: vmstate: add varray support to vmstate_of!
      rust: vmstate: implement Zeroable for VMStateField
      rust: vmstate: implement VMState for scalar types
      rust: vmstate: add public utility macros to implement VMState
      rust: qemu_api: add vmstate_struct
      rust: pl011: switch vmstate to new-style macros
      rust: vmstate: remove translation of C vmstate macros
      rust: vmstate: make order of parameters consistent in vmstate_clock
      rust: prefer NonNull::new to assertions
      rust: pl011: remove unnecessary "extern crate"
      rust: pl011: hide unnecessarily "pub" items from outside pl011::device
      rust: pl011: extract conversion to RegisterOffset
      rust: pl011: extract CharBackend receive logic into a separate function
      rust: pl011: pull interrupt updates out of read/write ops
      rust: pl011: extract PL011Registers
      rust: pl011: wrap registers with BqlRefCell
      rust: pl011: remove duplicate definitions
      rust: pl011: pull device-specific code out of MemoryRegionOps callbacks
      rust: pl011: drop use of ControlFlow
      rust: qdev: make reset take a shared reference
      rust/zeroable: Implement Zeroable with const_zero macro
      rust: qemu-api: add sub-subclass to the integration tests

Tao Su (4):
      target/i386: Introduce SierraForest-v2 model
      target/i386: Export BHI_NO bit to guests
      target/i386: Add new CPU model ClearwaterForest
      docs: Add GNR, SRF and CWF CPU models

Zhao Liu (5):
      stub: Fix build failure with --enable-user --disable-system --enable-tools
      rust/qdev: Make REALIZE safe
      rust/pl011: Avoid bindings::*
      memattrs: Convert unspecified member to bool
      memattrs: Check the size of MemTxAttrs

 docs/system/cpu-models-x86.rst.inc     |  50 ++-
 include/exec/memattrs.h                |  21 +-
 target/i386/cpu.h                      |  33 +-
 target/i386/cpu.c                      | 156 +++++++-
 target/i386/tcg/translate.c            | 363 ++++++++++-------
 target/i386/tcg/emit.c.inc             |  55 +--
 rust/hw/char/pl011/src/device.rs       | 489 +++++++++++++----------
 rust/hw/char/pl011/src/device_class.rs |  73 ++--
 rust/hw/char/pl011/src/lib.rs          |  67 ++--
 rust/hw/char/pl011/src/memory_ops.rs   |  25 +-
 rust/qemu-api/src/prelude.rs           |   2 +
 rust/qemu-api/src/qdev.rs              |  16 +-
 rust/qemu-api/src/qom.rs               |  21 +-
 rust/qemu-api/src/vmstate.rs           | 700 +++++++++++++++++++++------------
 rust/qemu-api/src/zeroable.rs          | 118 +++---
 rust/qemu-api/tests/tests.rs           |  56 ++-
 stubs/meson.build                      |   4 +-
 17 files changed, 1403 insertions(+), 846 deletions(-)

Comments

Stefan Hajnoczi Jan. 24, 2025, 7:05 p.m. UTC | #1
On Fri, 24 Jan 2025 at 04:52, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit d6430c17d7113d3c38480dc34e59d00b0504e2f7:
>
>   Merge tag 'pull-riscv-to-apply-20250119-1' of https://github.com/alistair23/qemu into staging (2025-01-19 08:55:46 -0500)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 9feb68638e504c91b59e745b94423e8536abfd03:
>
>   rust: qemu-api: add sub-subclass to the integration tests (2025-01-23 19:07:39 +0100)
>
> ----------------------------------------------------------------
> * target/i386: optimize string instructions
> * target/i386: new Sierra Forest and Clearwater Forest models
> * rust: type-safe vmstate implementation
> * rust: use interior mutability for PL011
> * rust: clean ups
> * memtxattrs: remove usage of bitfields from MEMTXATTRS_UNSPECIFIED

Hi Paolo,
Please take a look at this failure and send a v2 pull request, if necessary:

thread '<unnamed>' panicked at 'already borrowed',
rust/qemu-api/libqemu_api.rlib.p/structured/cell.rs:450:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

https://gitlab.com/qemu-project/qemu/-/jobs/8946857796

Thanks,
Stefan

>
> ----------------------------------------------------------------
> Paolo Bonzini (39):
>       rust: pl011: fix repr(C) for PL011Class
>       target/i386: inline gen_jcc into sole caller
>       target/i386: remove trailing 1 from gen_{j, cmov, set}cc1
>       target/i386: unify REP and REPZ/REPNZ generation
>       target/i386: unify choice between single and repeated string instructions
>       target/i386: reorganize ops emitted by do_gen_rep, drop repz_opt
>       target/i386: tcg: move gen_set/reset_* earlier in the file
>       target/i386: fix RF handling for string instructions
>       target/i386: make cc_op handling more explicit for repeated string instructions.
>       target/i386: do not use gen_op_jz_ecx for repeated string operations
>       target/i386: optimize CX handling in repeated string operations
>       target/i386: execute multiple REP/REPZ iterations without leaving TB
>       target/i386: pull computation of string update value out of loop
>       target/i386: extract common bits of gen_repz/gen_repz_nz
>       target/i386: avoid using s->tmp0 for add to implicit registers
>       rust: vmstate: add new type safe implementation
>       rust: vmstate: implement VMState for non-leaf types
>       rust: vmstate: add varray support to vmstate_of!
>       rust: vmstate: implement Zeroable for VMStateField
>       rust: vmstate: implement VMState for scalar types
>       rust: vmstate: add public utility macros to implement VMState
>       rust: qemu_api: add vmstate_struct
>       rust: pl011: switch vmstate to new-style macros
>       rust: vmstate: remove translation of C vmstate macros
>       rust: vmstate: make order of parameters consistent in vmstate_clock
>       rust: prefer NonNull::new to assertions
>       rust: pl011: remove unnecessary "extern crate"
>       rust: pl011: hide unnecessarily "pub" items from outside pl011::device
>       rust: pl011: extract conversion to RegisterOffset
>       rust: pl011: extract CharBackend receive logic into a separate function
>       rust: pl011: pull interrupt updates out of read/write ops
>       rust: pl011: extract PL011Registers
>       rust: pl011: wrap registers with BqlRefCell
>       rust: pl011: remove duplicate definitions
>       rust: pl011: pull device-specific code out of MemoryRegionOps callbacks
>       rust: pl011: drop use of ControlFlow
>       rust: qdev: make reset take a shared reference
>       rust/zeroable: Implement Zeroable with const_zero macro
>       rust: qemu-api: add sub-subclass to the integration tests
>
> Tao Su (4):
>       target/i386: Introduce SierraForest-v2 model
>       target/i386: Export BHI_NO bit to guests
>       target/i386: Add new CPU model ClearwaterForest
>       docs: Add GNR, SRF and CWF CPU models
>
> Zhao Liu (5):
>       stub: Fix build failure with --enable-user --disable-system --enable-tools
>       rust/qdev: Make REALIZE safe
>       rust/pl011: Avoid bindings::*
>       memattrs: Convert unspecified member to bool
>       memattrs: Check the size of MemTxAttrs
>
>  docs/system/cpu-models-x86.rst.inc     |  50 ++-
>  include/exec/memattrs.h                |  21 +-
>  target/i386/cpu.h                      |  33 +-
>  target/i386/cpu.c                      | 156 +++++++-
>  target/i386/tcg/translate.c            | 363 ++++++++++-------
>  target/i386/tcg/emit.c.inc             |  55 +--
>  rust/hw/char/pl011/src/device.rs       | 489 +++++++++++++----------
>  rust/hw/char/pl011/src/device_class.rs |  73 ++--
>  rust/hw/char/pl011/src/lib.rs          |  67 ++--
>  rust/hw/char/pl011/src/memory_ops.rs   |  25 +-
>  rust/qemu-api/src/prelude.rs           |   2 +
>  rust/qemu-api/src/qdev.rs              |  16 +-
>  rust/qemu-api/src/qom.rs               |  21 +-
>  rust/qemu-api/src/vmstate.rs           | 700 +++++++++++++++++++++------------
>  rust/qemu-api/src/zeroable.rs          | 118 +++---
>  rust/qemu-api/tests/tests.rs           |  56 ++-
>  stubs/meson.build                      |   4 +-
>  17 files changed, 1403 insertions(+), 846 deletions(-)
> --
> 2.48.1
>
>
Paolo Bonzini Jan. 24, 2025, 8:38 p.m. UTC | #2
Il ven 24 gen 2025, 20:05 Stefan Hajnoczi <stefanha@gmail.com> ha scritto:

> Hi Paolo,
> Please take a look at this failure and send a v2 pull request, if
> necessary:
>
> thread '<unnamed>' panicked at 'already borrowed',
> rust/qemu-api/libqemu_api.rlib.p/structured/cell.rs:450:5
> note: run with `RUST_BACKTRACE=1` environment variable to display a
> backtrace
> fatal runtime error: failed to initiate panic, error 5
>
> https://gitlab.com/qemu-project/qemu/-/jobs/8946857796


Yes, it's a real bug.

Paolo


>
> Thanks,
> Stefan
>
> >
> > ----------------------------------------------------------------
> > Paolo Bonzini (39):
> >       rust: pl011: fix repr(C) for PL011Class
> >       target/i386: inline gen_jcc into sole caller
> >       target/i386: remove trailing 1 from gen_{j, cmov, set}cc1
> >       target/i386: unify REP and REPZ/REPNZ generation
> >       target/i386: unify choice between single and repeated string
> instructions
> >       target/i386: reorganize ops emitted by do_gen_rep, drop repz_opt
> >       target/i386: tcg: move gen_set/reset_* earlier in the file
> >       target/i386: fix RF handling for string instructions
> >       target/i386: make cc_op handling more explicit for repeated string
> instructions.
> >       target/i386: do not use gen_op_jz_ecx for repeated string
> operations
> >       target/i386: optimize CX handling in repeated string operations
> >       target/i386: execute multiple REP/REPZ iterations without leaving
> TB
> >       target/i386: pull computation of string update value out of loop
> >       target/i386: extract common bits of gen_repz/gen_repz_nz
> >       target/i386: avoid using s->tmp0 for add to implicit registers
> >       rust: vmstate: add new type safe implementation
> >       rust: vmstate: implement VMState for non-leaf types
> >       rust: vmstate: add varray support to vmstate_of!
> >       rust: vmstate: implement Zeroable for VMStateField
> >       rust: vmstate: implement VMState for scalar types
> >       rust: vmstate: add public utility macros to implement VMState
> >       rust: qemu_api: add vmstate_struct
> >       rust: pl011: switch vmstate to new-style macros
> >       rust: vmstate: remove translation of C vmstate macros
> >       rust: vmstate: make order of parameters consistent in vmstate_clock
> >       rust: prefer NonNull::new to assertions
> >       rust: pl011: remove unnecessary "extern crate"
> >       rust: pl011: hide unnecessarily "pub" items from outside
> pl011::device
> >       rust: pl011: extract conversion to RegisterOffset
> >       rust: pl011: extract CharBackend receive logic into a separate
> function
> >       rust: pl011: pull interrupt updates out of read/write ops
> >       rust: pl011: extract PL011Registers
> >       rust: pl011: wrap registers with BqlRefCell
> >       rust: pl011: remove duplicate definitions
> >       rust: pl011: pull device-specific code out of MemoryRegionOps
> callbacks
> >       rust: pl011: drop use of ControlFlow
> >       rust: qdev: make reset take a shared reference
> >       rust/zeroable: Implement Zeroable with const_zero macro
> >       rust: qemu-api: add sub-subclass to the integration tests
> >
> > Tao Su (4):
> >       target/i386: Introduce SierraForest-v2 model
> >       target/i386: Export BHI_NO bit to guests
> >       target/i386: Add new CPU model ClearwaterForest
> >       docs: Add GNR, SRF and CWF CPU models
> >
> > Zhao Liu (5):
> >       stub: Fix build failure with --enable-user --disable-system
> --enable-tools
> >       rust/qdev: Make REALIZE safe
> >       rust/pl011: Avoid bindings::*
> >       memattrs: Convert unspecified member to bool
> >       memattrs: Check the size of MemTxAttrs
> >
> >  docs/system/cpu-models-x86.rst.inc     |  50 ++-
> >  include/exec/memattrs.h                |  21 +-
> >  target/i386/cpu.h                      |  33 +-
> >  target/i386/cpu.c                      | 156 +++++++-
> >  target/i386/tcg/translate.c            | 363 ++++++++++-------
> >  target/i386/tcg/emit.c.inc             |  55 +--
> >  rust/hw/char/pl011/src/device.rs       | 489 +++++++++++++----------
> >  rust/hw/char/pl011/src/device_class.rs |  73 ++--
> >  rust/hw/char/pl011/src/lib.rs          |  67 ++--
> >  rust/hw/char/pl011/src/memory_ops.rs   |  25 +-
> >  rust/qemu-api/src/prelude.rs           |   2 +
> >  rust/qemu-api/src/qdev.rs              |  16 +-
> >  rust/qemu-api/src/qom.rs               |  21 +-
> >  rust/qemu-api/src/vmstate.rs           | 700
> +++++++++++++++++++++------------
> >  rust/qemu-api/src/zeroable.rs          | 118 +++---
> >  rust/qemu-api/tests/tests.rs           |  56 ++-
> >  stubs/meson.build                      |   4 +-
> >  17 files changed, 1403 insertions(+), 846 deletions(-)
> > --
> > 2.48.1
> >
> >
>
>