Branch: refs/heads/staging-10.0
  Home:   https://github.com/qemu/qemu
  Commit: cf6d62c5c98c26eb24622d7528b4f73f791f0d9b
      
https://github.com/qemu/qemu/commit/cf6d62c5c98c26eb24622d7528b4f73f791f0d9b
  Author: Xianglai Li <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M hw/loongarch/virt-fdt-build.c

  Log Message:
  -----------
  hw/loongarch/virt: Modify the interrupt trigger type in fdt table

In the loongarch virt fdt file, the interrupt trigger type directly
uses magic numbers. Now, refer to the definitions in the linux kernel and
use macro definitions.

Signed-off-by: Xianglai Li <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit 47de28a0b7fb96531271aaeaa3e7f2cad2b91221)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 297b8ea0f574c6cd4fd2005e04dc584d6f157d23
      
https://github.com/qemu/qemu/commit/297b8ea0f574c6cd4fd2005e04dc584d6f157d23
  Author: Xianglai Li <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M hw/loongarch/virt-fdt-build.c

  Log Message:
  -----------
  hw/loongarch/virt: Fix irq allocation failure with pci device from fdt

When we use the -kernel parameter to start an elf format kernel relying on
fdt, we get the following error:

pcieport 0000:00:01.0: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.0: enabling device (0000 -> 0003)
pcieport 0000:00:01.0: PME: Signaling with IRQ 19
pcieport 0000:00:01.0: AER: enabled with IRQ 19
pcieport 0000:00:01.1: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.1: enabling device (0000 -> 0003)
pcieport 0000:00:01.1: PME: Signaling with IRQ 20
pcieport 0000:00:01.1: AER: enabled with IRQ 20
pcieport 0000:00:01.2: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.2: enabling device (0000 -> 0003)
pcieport 0000:00:01.2: PME: Signaling with IRQ 21
pcieport 0000:00:01.2: AER: enabled with IRQ 21
pcieport 0000:00:01.3: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.3: enabling device (0000 -> 0003)
pcieport 0000:00:01.3: PME: Signaling with IRQ 22
pcieport 0000:00:01.3: AER: enabled with IRQ 22
pcieport 0000:00:01.4: of_irq_parse_pci: failed with rc=-22

This is because  the description of interrupt-cell is missing in the pcie
irq map.  And there is a lack of a description of the interrupt trigger
type.  Now it is corrected and the correct interrupt-cell is added in the
pcie irq map.

Refer to the implementation in arm and add some comments.

Signed-off-by: Xianglai Li <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit ff54394eed148c642f83b45753c7898acdbd5ddb)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 6fdac75e78af136d07ceeae1a4218f54a0db72ed
      
https://github.com/qemu/qemu/commit/6fdac75e78af136d07ceeae1a4218f54a0db72ed
  Author: Song Gao <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/loongarch/cpu.c

  Log Message:
  -----------
  target/loongach: Fix some exceptions failure in updating CSR_BADV

According to Volume 1 Manual 7.4.8 ,exception,SYS,BRK,INE,IPE,PPD
FPE,SXD,ASXD are need't update CSR_BADV, this patch correct it.

Signed-off-by: Song Gao <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit 70cf9b7bf7aff47f8d85ccce35b688dd91335cf0)
(Mjt: the changes are in target/loongarch/cpu.h in 10.0)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 788dcf5c0a970ddb08cc90b521e0722894fdf6ed
      
https://github.com/qemu/qemu/commit/788dcf5c0a970ddb08cc90b521e0722894fdf6ed
  Author: Song Gao <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/loongarch/cpu.c

  Log Message:
  -----------
  target/loongarch: Fix exception BCE missing to update CSR_BADV

Exception BCE need update CSR_BADV, and the value is env->pc.

Signed-off-by: Song Gao <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit e4f0ef58d53eb20056f9f3ca9f21dbbbf25f2530)
(Mjt: the changes are in target/loongarch/cpu.c in 10.0)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: ed709c0e1df82b349578af10f1921950867f73d0
      
https://github.com/qemu/qemu/commit/ed709c0e1df82b349578af10f1921950867f73d0
  Author: Song Gao <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/loongarch/cpu.c

  Log Message:
  -----------
  target/loongarch: Fix exception ADEF/ADEM missing to update CSR_BADV

Exception ADEM/ADEF need update CSR_BADV, the value from the virtual
address.

Signed-off-by: Song Gao <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit a7be2e0a3f7d0f35bcc3b17e2b558084efc5d9fe)
(Mjt: the changes are in target/loongarch/cpu.c in 10.0)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 8491f9426876423cc0fce55a553e6ef256b1b745
      
https://github.com/qemu/qemu/commit/8491f9426876423cc0fce55a553e6ef256b1b745
  Author: Yao Zi <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M hw/loongarch/virt.c

  Log Message:
  -----------
  hw/loongarch/virt: Don't abort on access to unimplemented IOCSR

Since commit f2e61edb2946 ("hw/loongarch/virt: Use MemTxAttrs interface
for misc ops") which adds a call to g_assert_not_reached() in the path
of handling unimplemented IOCSRs, QEMU would abort when the guest
accesses unimplemented IOCSRs.

This is too serious since there's nothing fatal happening in QEMU
itself, and the guest could probably continue running if we give zero as
result for these reads, which also matches the behavior observed on
3A5000M real machine.

Replace the assertion with qemu_log_mask(LOG_UNIMP, ...), it's still
possible to examine unimplemented IOCSR access through "-d unimp"
command line arguments.

Fixes: f2e61edb2946 ("hw/loongarch/virt: Use MemTxAttrs interface for misc ops")
Signed-off-by: Yao Zi <[email protected]>
Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
(cherry picked from commit 49ee001a5b8378e9a9b3db8cbf61e7eda970ecd2)
(Mjt: trivial context fix for 10.0)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 21264e6c98b7af9083045b7ca9a507239102e509
      
https://github.com/qemu/qemu/commit/21264e6c98b7af9083045b7ca9a507239102e509
  Author: Alex Bennée <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M tests/functional/test_arm_aspeed_rainier.py

  Log Message:
  -----------
  tests/functional: migrate aspeed_rainier image

Cedric has a host for the file which allows us to keep the name.

Cc: [email protected]
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Message-id: [email protected]
Cc: Cédric Le Goater <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
(cherry picked from commit 7cf096d609e67fd06abf6a59e592cb6de427825c)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: bf1070909b17315d2d9c7b4b7beb0e2093fe6a41
      
https://github.com/qemu/qemu/commit/bf1070909b17315d2d9c7b4b7beb0e2093fe6a41
  Author: Peter Maydell <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Don't specify ID_PFR1 accessfn twice

In the definition of ID_PFR1 we have an ifdef block; we specify the
accessfn once in the common part of the ifdef and once in the
not-user-only part, which is redundant but harmless.

The accessfn will always return success in user-only mode (because
we won't trap to EL2), so specify it only in the not-user-only
half of the ifdef, as was probably the intention.

This is only cc'd to stable to avoid a textual conflict with
the following patch, which is a bug fix.

Cc: [email protected]
Fixes: 0f150c8499e970bd ("target/arm: Constify ID_PFR1 on user emulation")
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
(cherry picked from commit 8da52b8401afa34ea8caa58e1bfb321ae142899b)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 4d402fcd1cba7ff5ab9b797963cd94d419d74775
      
https://github.com/qemu/qemu/commit/4d402fcd1cba7ff5ab9b797963cd94d419d74775
  Author: Peter Maydell <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Correctly honour HCR.TID3 for v7A cores

The HCR.TID3 bit defines that we should trap to the hypervisor for
reads to a collection of ID registers. Different architecture versions
have defined this differently:

 * v7A has a set of ID regs that definitely must trap:
    - ID_PFR{0,1}, ID_DFR0, ID_AFR0, ID_MMFR{0,1,2,3},
      ID_ISAR{0,1,2,3,4,5}, MVFR{0,1}
   and somewhat vaguely says that "there is no requirement"
   to trap for registers that are reserved in the ID reg space
   (i.e. which RAZ and might be used for new ID regs in future)
 * v8A adds to this list:
    - ID_PFR2 and MVFR2 must trap
    - ID_MMFR4, ID_MMFR5, ID_ISAR6, ID_DFR1 and reserved registers
      in the ID reg space must trap if FEAT_FGT is implemented,
      and it is IMPDEF if they trap if FEAT_FGT is not implemented

In QEMU we seem to have attempted to implement this distinction
(taking the "we do trap" IMPDEF choice if no FEAT_FGT), with
access_aa64_tid3() always trapping on TID3 and access_aa32_tid3()
trapping only if ARM_FEATURE_V8 is set.  However, we didn't apply
these to the right set of registers: we use access_aa32_tid3() on all
the 32-bit ID registers *except* ID_PFR2, ID_DFR1, ID_MMFR5 and the
RES0 space, which means that for a v7 CPU we don't trap on a lot of
registers that we should trap on, and we do trap on various things
that the v7A Arm ARM says there is "no requirement" to trap on.

Straighten this out by naming the access functions more clearly for
their purpose, and documenting this: access_v7_tid3() is only for the
fixed set of ID registers that v7A traps on HCR.TID3, and
access_tid3() is for any others, including the reserved encoding
spaces and any new registers we add in future.

AArch32 MVFR2 access is handled differently, in check_hcr_el2_trap;
there we already do not trap on TID3 on v7A cores (where MVFR2
doesn't exist), because we in the code-generation function we UNDEF
if ARM_FEATURE_V8 is not set, without generating code to call
check_hcr_el2_trap.

This bug was causing a problem for Xen which (after a recent change
to Xen) expects to be able to trap ID_PFR0 on a Cortex-A15.

The result of these changes is that our v8A behaviour remains
the same, and on v7A we now trap the registers the Arm ARM definitely
requires us to trap, and don't trap the reserved space that "there is
no requirement" to trap.

Cc: [email protected]
Fixes: 6a4ef4e5d1084c ("target/arm: Honor HCR_EL2.TID3 trapping requirements")
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
(cherry picked from commit 205ca535abaceda375c54797b1129a54a5ebbe96)
(Mjt: back-port to 10.0.x)
Signed-off-by: Michael Tokarev <[email protected]>


  Commit: 012d0a1753a7c2833858a208542d4329d6789370
      
https://github.com/qemu/qemu/commit/012d0a1753a7c2833858a208542d4329d6789370
  Author: Peter Maydell <[email protected]>
  Date:   2026-01-18 (Sun, 18 Jan 2026)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Correctly trap HCR.TID1 registers in v7A

In v7A HCR.TID1 is defined to trap for TCMTR, TLBTR, REVIDR and AIDR.
We incorrectly use an accessfn for REVIDR and AIDR that only traps on
v8A cores.  Fix this by collapsing access_aa64_tid1() and
access_aa32_tid1() together and never doing a check for v8 vs v7.

The accessfn is also used for SMIDR_EL1, which is fine as this
register is AArch64 only.

Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
(cherry picked from commit b67a35622f9a816544ec094132d8af0debfac7f2)
Signed-off-by: Michael Tokarev <[email protected]>


Compare: https://github.com/qemu/qemu/compare/acbd0bfd28ab...012d0a1753a7

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to