* [PULL 00/21] target-arm queue
@ 2021-01-12 16:57 Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2021-01-12 16:57 UTC (permalink / raw)
To: qemu-devel
Arm queue; not huge but I figured I might as well send it out since
I've been doing code review today and there's no queue of unprocessed
pullreqs...
thanks
-- PMM
The following changes since commit b3f846c59d8405bb87c551187721fc92ff2f1b92:
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2021-01-11v2' into staging (2021-01-11 15:15:35 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210112
for you to fetch changes up to 19d131395ccaf503db21dadd8257e6dc9fc1d7de:
ui/cocoa: Fix openFile: deprecation on Big Sur (2021-01-12 11:38:37 +0000)
----------------------------------------------------------------
target-arm queue:
* arm: Support emulation of ARMv8.4-TTST extension
* arm: Update cpu.h ID register field definitions
* arm: Fix breakage of XScale instruction emulation
* hw/net/lan9118: Fix RX Status FIFO PEEK value
* npcm7xx: Add ADC and PWM emulation
* ui/cocoa: Make "open docs" help menu entry work again when binary
is run from the build tree
* ui/cocoa: Fix openFile: deprecation on Big Sur
* docs: Add qemu-storage-daemon(1) manpage to meson.build
* docs: Build and install all the docs in a single manual
----------------------------------------------------------------
Hao Wu (6):
hw/misc: Add clock converter in NPCM7XX CLK module
hw/timer: Refactor NPCM7XX Timer to use CLK clock
hw/adc: Add an ADC module for NPCM7XX
hw/misc: Add a PWM module for NPCM7XX
hw/misc: Add QTest for NPCM7XX PWM Module
hw/*: Use type casting for SysBusDevice in NPCM7XX
Leif Lindholm (6):
target/arm: fix typo in cpu.h ID_AA64PFR1 field name
target/arm: make ARMCPU.clidr 64-bit
target/arm: make ARMCPU.ctr 64-bit
target/arm: add descriptions of CLIDR_EL1, CCSIDR_EL1, CTR_EL0 to cpu.h
target/arm: add aarch64 ID register fields to cpu.h
target/arm: add aarch32 ID register fields to cpu.h
Peter Maydell (5):
docs: Add qemu-storage-daemon(1) manpage to meson.build
docs: Build and install all the docs in a single manual
target/arm: Don't decode insns in the XScale/iWMMXt space as cp insns
hw/net/lan9118: Fix RX Status FIFO PEEK value
hw/net/lan9118: Add symbolic constants for register offsets
Roman Bolshakov (2):
ui/cocoa: Update path to docs in build tree
ui/cocoa: Fix openFile: deprecation on Big Sur
Rémi Denis-Courmont (2):
target/arm: ARMv8.4-TTST extension
target/arm: enable Small Translation tables in max CPU
docs/conf.py | 46 ++-
docs/devel/conf.py | 15 -
docs/index.html.in | 17 -
docs/interop/conf.py | 28 --
docs/meson.build | 65 ++--
docs/specs/conf.py | 16 -
docs/system/arm/nuvoton.rst | 4 +-
docs/system/conf.py | 28 --
docs/tools/conf.py | 37 --
docs/user/conf.py | 15 -
meson.build | 1 +
hw/adc/trace.h | 1 +
include/hw/adc/npcm7xx_adc.h | 69 ++++
include/hw/arm/npcm7xx.h | 4 +
include/hw/misc/npcm7xx_clk.h | 146 ++++++-
include/hw/misc/npcm7xx_pwm.h | 105 +++++
include/hw/timer/npcm7xx_timer.h | 1 +
target/arm/cpu.h | 85 ++++-
hw/adc/npcm7xx_adc.c | 301 +++++++++++++++
hw/arm/npcm7xx.c | 55 ++-
hw/arm/npcm7xx_boards.c | 2 +-
hw/mem/npcm7xx_mc.c | 2 +-
hw/misc/npcm7xx_clk.c | 807 ++++++++++++++++++++++++++++++++++++++-
hw/misc/npcm7xx_gcr.c | 2 +-
hw/misc/npcm7xx_pwm.c | 550 ++++++++++++++++++++++++++
hw/misc/npcm7xx_rng.c | 2 +-
hw/net/lan9118.c | 26 +-
hw/nvram/npcm7xx_otp.c | 2 +-
hw/ssi/npcm7xx_fiu.c | 2 +-
hw/timer/npcm7xx_timer.c | 39 +-
target/arm/cpu64.c | 1 +
target/arm/helper.c | 15 +-
target/arm/translate.c | 7 +
tests/qtest/npcm7xx_adc-test.c | 377 ++++++++++++++++++
tests/qtest/npcm7xx_pwm-test.c | 490 ++++++++++++++++++++++++
hw/adc/meson.build | 1 +
hw/adc/trace-events | 5 +
hw/misc/meson.build | 1 +
hw/misc/trace-events | 6 +
tests/qtest/meson.build | 4 +-
ui/cocoa.m | 7 +-
41 files changed, 3124 insertions(+), 263 deletions(-)
delete mode 100644 docs/devel/conf.py
delete mode 100644 docs/index.html.in
delete mode 100644 docs/interop/conf.py
delete mode 100644 docs/specs/conf.py
delete mode 100644 docs/system/conf.py
delete mode 100644 docs/tools/conf.py
delete mode 100644 docs/user/conf.py
create mode 100644 hw/adc/trace.h
create mode 100644 include/hw/adc/npcm7xx_adc.h
create mode 100644 include/hw/misc/npcm7xx_pwm.h
create mode 100644 hw/adc/npcm7xx_adc.c
create mode 100644 hw/misc/npcm7xx_pwm.c
create mode 100644 tests/qtest/npcm7xx_adc-test.c
create mode 100644 tests/qtest/npcm7xx_pwm-test.c
create mode 100644 hw/adc/trace-events
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2021-02-02 17:54 Peter Maydell
2021-02-03 9:22 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2021-02-02 17:54 UTC (permalink / raw)
To: qemu-devel
Mostly just bug fixes. The important one here is
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
which fixes a buffer overrun that's a security issue if you're running
KVM on Arm with kernel-irqchip=off (which hopefully nobody is doing in
a security context, because kernel-irqchip=on is the default and the
sensible choice for performance).
-- PMM
The following changes since commit cf7ca7d5b9faca13f1f8e3ea92cfb2f741eb0c0e:
Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging (2021-02-01 16:28:00 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210202-1
for you to fetch changes up to 14657850c9cc10948551fbb884c30eb5a3a7370a:
hw/arm: Display CPU type in machine description (2021-02-02 17:53:44 +0000)
----------------------------------------------------------------
target-arm queue:
* hw/intc/arm_gic: Allow to use QTest without crashing
* hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
* hw/char/exynos4210_uart: Fix missing call to report ready for input
* hw/arm/smmuv3: Fix addr_mask for range-based invalidation
* hw/ssi/imx_spi: Fix various minor bugs
* hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
* hw/arm: Add missing Kconfig dependencies
* hw/arm: Display CPU type in machine description
----------------------------------------------------------------
Bin Meng (5):
hw/ssi: imx_spi: Use a macro for number of chip selects supported
hw/ssi: imx_spi: Remove imx_spi_update_irq() in imx_spi_reset()
hw/ssi: imx_spi: Round up the burst length to be multiple of 8
hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic
hw/ssi: imx_spi: Correct tx and rx fifo endianness
Iris Johnson (2):
hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
hw/char/exynos4210_uart: Fix missing call to report ready for input
Philippe Mathieu-Daudé (12):
hw/intc/arm_gic: Allow to use QTest without crashing
hw/ssi: imx_spi: Remove pointless variable initialization
hw/ssi: imx_spi: Rework imx_spi_reset() to keep CONREG register value
hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled
hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
hw/arm/stm32f405_soc: Add missing dependency on OR_IRQ
hw/arm/exynos4210: Add missing dependency on OR_IRQ
hw/arm/xlnx-versal: Versal SoC requires ZDMA
hw/arm/xlnx-versal: Versal SoC requires ZynqMP peripherals
hw/net/can: ZynqMP CAN device requires PTIMER
hw/arm: Display CPU type in machine description
Xuzhou Cheng (1):
hw/ssi: imx_spi: Disable chip selects when controller is disabled
Zenghui Yu (1):
hw/arm/smmuv3: Fix addr_mask for range-based invalidation
include/hw/ssi/imx_spi.h | 5 +-
hw/arm/digic_boards.c | 2 +-
hw/arm/microbit.c | 2 +-
hw/arm/netduino2.c | 2 +-
hw/arm/netduinoplus2.c | 2 +-
hw/arm/orangepi.c | 2 +-
hw/arm/smmuv3.c | 4 +-
hw/arm/stellaris.c | 4 +-
hw/char/exynos4210_uart.c | 7 ++-
hw/intc/arm_gic.c | 5 +-
hw/ssi/imx_spi.c | 153 +++++++++++++++++++++++++++++-----------------
hw/Kconfig | 1 +
hw/arm/Kconfig | 5 ++
hw/dma/Kconfig | 3 +
hw/dma/meson.build | 2 +-
15 files changed, 130 insertions(+), 69 deletions(-)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2021-02-02 17:54 Peter Maydell
@ 2021-02-03 9:22 ` Philippe Mathieu-Daudé
2021-02-03 10:12 ` P J P
0 siblings, 1 reply; 43+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-03 9:22 UTC (permalink / raw)
To: Peter Maydell, Prasad J Pandit; +Cc: Prasad J Pandit, qemu-devel
Hi Peter,
On 2/2/21 6:54 PM, Peter Maydell wrote:
> Mostly just bug fixes. The important one here is
> hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
> which fixes a buffer overrun that's a security issue if you're running
> KVM on Arm with kernel-irqchip=off (which hopefully nobody is doing in
> a security context, because kernel-irqchip=on is the default and the
> sensible choice for performance).
FYI Prasad mentioned a CVE was requested:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg778659.html
As you said it is an odd configuration, I am not sure it is worth
to wait for the CVE number to add it to the commit (which helps
downstream distributions tracking these).
[updating]
Just got detail from Prasad on IRC, it usually takes ~1 day to get
the CVE number assigned, so maybe worth postponing this until tomorrow.
Prasad, can you reply to this message ASAP once you get the number?
Thanks,
Phil.
> -- PMM
>
> The following changes since commit cf7ca7d5b9faca13f1f8e3ea92cfb2f741eb0c0e:
>
> Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging (2021-02-01 16:28:00 +0000)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210202-1
>
> for you to fetch changes up to 14657850c9cc10948551fbb884c30eb5a3a7370a:
>
> hw/arm: Display CPU type in machine description (2021-02-02 17:53:44 +0000)
>
> ----------------------------------------------------------------
> target-arm queue:
> * hw/intc/arm_gic: Allow to use QTest without crashing
> * hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
> * hw/char/exynos4210_uart: Fix missing call to report ready for input
> * hw/arm/smmuv3: Fix addr_mask for range-based invalidation
> * hw/ssi/imx_spi: Fix various minor bugs
> * hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
> * hw/arm: Add missing Kconfig dependencies
> * hw/arm: Display CPU type in machine description
>
> ----------------------------------------------------------------
> Bin Meng (5):
> hw/ssi: imx_spi: Use a macro for number of chip selects supported
> hw/ssi: imx_spi: Remove imx_spi_update_irq() in imx_spi_reset()
> hw/ssi: imx_spi: Round up the burst length to be multiple of 8
> hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic
> hw/ssi: imx_spi: Correct tx and rx fifo endianness
>
> Iris Johnson (2):
> hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
> hw/char/exynos4210_uart: Fix missing call to report ready for input
>
> Philippe Mathieu-Daudé (12):
> hw/intc/arm_gic: Allow to use QTest without crashing
> hw/ssi: imx_spi: Remove pointless variable initialization
> hw/ssi: imx_spi: Rework imx_spi_reset() to keep CONREG register value
> hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled
> hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled
> hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
> hw/arm/stm32f405_soc: Add missing dependency on OR_IRQ
> hw/arm/exynos4210: Add missing dependency on OR_IRQ
> hw/arm/xlnx-versal: Versal SoC requires ZDMA
> hw/arm/xlnx-versal: Versal SoC requires ZynqMP peripherals
> hw/net/can: ZynqMP CAN device requires PTIMER
> hw/arm: Display CPU type in machine description
>
> Xuzhou Cheng (1):
> hw/ssi: imx_spi: Disable chip selects when controller is disabled
>
> Zenghui Yu (1):
> hw/arm/smmuv3: Fix addr_mask for range-based invalidation
>
> include/hw/ssi/imx_spi.h | 5 +-
> hw/arm/digic_boards.c | 2 +-
> hw/arm/microbit.c | 2 +-
> hw/arm/netduino2.c | 2 +-
> hw/arm/netduinoplus2.c | 2 +-
> hw/arm/orangepi.c | 2 +-
> hw/arm/smmuv3.c | 4 +-
> hw/arm/stellaris.c | 4 +-
> hw/char/exynos4210_uart.c | 7 ++-
> hw/intc/arm_gic.c | 5 +-
> hw/ssi/imx_spi.c | 153 +++++++++++++++++++++++++++++-----------------
> hw/Kconfig | 1 +
> hw/arm/Kconfig | 5 ++
> hw/dma/Kconfig | 3 +
> hw/dma/meson.build | 2 +-
> 15 files changed, 130 insertions(+), 69 deletions(-)
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2021-02-03 9:22 ` Philippe Mathieu-Daudé
@ 2021-02-03 10:12 ` P J P
0 siblings, 0 replies; 43+ messages in thread
From: P J P @ 2021-02-03 10:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Peter Maydell, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
+-- On Wed, 3 Feb 2021, Philippe Mathieu-Daudé wrote --+
| FYI Prasad mentioned a CVE was requested:
| https://www.mail-archive.com/qemu-devel@nongnu.org/msg778659.html
|
| As you said it is an odd configuration, I am not sure it is worth
| to wait for the CVE number to add it to the commit (which helps
| downstream distributions tracking these).
|
| [updating]
|
| Just got detail from Prasad on IRC, it usually takes ~1 day to get
| the CVE number assigned, so maybe worth postponing this until tomorrow.
|
| Prasad, can you reply to this message ASAP once you get the number?
'CVE-2021-20221' assigned by Red Hat Inc.
-> https://bugs.launchpad.net/qemu/+bug/1914353/comments/3
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2021-08-02 11:57 Peter Maydell
2021-08-02 13:51 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2021-08-02 11:57 UTC (permalink / raw)
To: qemu-devel
A largish pullreq but it's almost all docs fixes.
-- PMM
The following changes since commit 10a3c4a4b3e14208cfed274514d1911e5230935f:
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-08-02 09:47:07 +0100)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210802
for you to fetch changes up to 4a64939db76b10d8d41d2af3c6aad8142da55450:
docs: Move user-facing barrier docs into system manual (2021-08-02 12:55:51 +0100)
----------------------------------------------------------------
target-arm queue:
* Add documentation of Arm 'mainstone', 'kzm', 'imx25-pdk' boards
* MAINTAINERS: Don't list Andrzej Zaborowski for various components
* docs: Remove stale TODO comments about license and version
* docs: Move licence/copyright from HTML output to rST comments
* docs: Format literal text correctly
* hw/arm/boot: Report error if there is no fw_cfg device in the machine
* docs: rSTify barrier.txt and bootindex.txt
----------------------------------------------------------------
Peter Maydell (21):
docs: Add documentation of Arm 'mainstone' board
docs: Add documentation of Arm 'kzm' board
docs: Add documentation of Arm 'imx25-pdk' board
MAINTAINERS: Don't list Andrzej Zaborowski for various components
docs: Remove stale TODO comments about license and version
docs: Move licence/copyright from HTML output to rST comments
docs/devel/build-system.rst: Format literals correctly
docs/devel/build-system.rst: Correct typo in example code
docs/devel/ebpf_rss.rst: Format literals correctly
docs/devel/migration.rst: Format literals correctly
docs/devel: Format literals correctly
docs/system/s390x/protvirt.rst: Format literals correctly
docs/system/arm/cpu-features.rst: Format literals correctly
docs: Format literals correctly
docs/about/removed-features: Fix markup error
docs/tools/virtiofsd.rst: Delete stray backtick
hw/arm/boot: Report error if there is no fw_cfg device in the machine
docs: Move bootindex.txt into system section and rstify
docs: Move the protocol part of barrier.txt into interop
ui/input-barrier: Move TODOs from barrier.txt to a comment
docs: Move user-facing barrier docs into system manual
docs/about/index.rst | 2 +-
docs/about/removed-features.rst | 2 +-
docs/barrier.txt | 370 -----------------------
docs/bootindex.txt | 52 ----
docs/devel/build-system.rst | 160 +++++-----
docs/devel/ebpf_rss.rst | 18 +-
docs/devel/migration.rst | 36 +--
docs/devel/qgraph.rst | 8 +-
docs/devel/tcg-plugins.rst | 14 +-
docs/devel/testing.rst | 8 +-
docs/interop/barrier.rst | 426 +++++++++++++++++++++++++++
docs/interop/index.rst | 1 +
docs/interop/live-block-operations.rst | 2 +-
docs/interop/qemu-ga-ref.rst | 9 -
docs/interop/qemu-qmp-ref.rst | 9 -
docs/interop/qemu-storage-daemon-qmp-ref.rst | 9 -
docs/interop/vhost-user-gpu.rst | 7 +-
docs/interop/vhost-user.rst | 12 +-
docs/system/arm/cpu-features.rst | 116 ++++----
docs/system/arm/imx25-pdk.rst | 19 ++
docs/system/arm/kzm.rst | 18 ++
docs/system/arm/mainstone.rst | 25 ++
docs/system/arm/nuvoton.rst | 2 +-
docs/system/arm/sbsa.rst | 4 +-
docs/system/arm/virt.rst | 2 +-
docs/system/barrier.rst | 44 +++
docs/system/bootindex.rst | 76 +++++
docs/system/cpu-hotplug.rst | 2 +-
docs/system/generic-loader.rst | 4 +-
docs/system/guest-loader.rst | 6 +-
docs/system/index.rst | 2 +
docs/system/ppc/powernv.rst | 8 +-
docs/system/riscv/microchip-icicle-kit.rst | 2 +-
docs/system/riscv/virt.rst | 2 +-
docs/system/s390x/protvirt.rst | 12 +-
docs/system/target-arm.rst | 3 +
docs/tools/virtiofsd.rst | 2 +-
hw/arm/boot.c | 9 +
hw/arm/sbsa-ref.c | 7 -
ui/input-barrier.c | 5 +
MAINTAINERS | 8 +-
41 files changed, 849 insertions(+), 674 deletions(-)
delete mode 100644 docs/barrier.txt
delete mode 100644 docs/bootindex.txt
create mode 100644 docs/interop/barrier.rst
create mode 100644 docs/system/arm/imx25-pdk.rst
create mode 100644 docs/system/arm/kzm.rst
create mode 100644 docs/system/arm/mainstone.rst
create mode 100644 docs/system/barrier.rst
create mode 100644 docs/system/bootindex.rst
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2021-08-02 11:57 Peter Maydell
@ 2021-08-02 13:51 ` Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2021-08-02 13:51 UTC (permalink / raw)
To: QEMU Developers
On Mon, 2 Aug 2021 at 12:58, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> A largish pullreq but it's almost all docs fixes.
>
> -- PMM
>
> The following changes since commit 10a3c4a4b3e14208cfed274514d1911e5230935f:
>
> Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-08-02 09:47:07 +0100)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210802
>
> for you to fetch changes up to 4a64939db76b10d8d41d2af3c6aad8142da55450:
>
> docs: Move user-facing barrier docs into system manual (2021-08-02 12:55:51 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
> * Add documentation of Arm 'mainstone', 'kzm', 'imx25-pdk' boards
> * MAINTAINERS: Don't list Andrzej Zaborowski for various components
> * docs: Remove stale TODO comments about license and version
> * docs: Move licence/copyright from HTML output to rST comments
> * docs: Format literal text correctly
> * hw/arm/boot: Report error if there is no fw_cfg device in the machine
> * docs: rSTify barrier.txt and bootindex.txt
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2022-03-18 13:22 Peter Maydell
2022-03-19 10:09 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2022-03-18 13:22 UTC (permalink / raw)
To: qemu-devel
Mostly straightforward bugfixes. The new Xilinx devices are
arguably 'new feature', but they're fixing a regression where
our changes to PSCI in commit 3f37979bf mean that EL3 guest
code now needs to talk to a proper emulated power-controller
device to turn on secondary CPUs; and it's not yet rc1 and
they only affect the Xilinx board, so it seems OK to me.
thanks
-- PMM
The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3:
Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu into staging (2022-03-16 10:43:58 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220318
for you to fetch changes up to 79d54c9eac04c554e3c081589542f801ace71797:
util/osdep: Remove some early cruft (2022-03-18 11:32:13 +0000)
----------------------------------------------------------------
target-arm queue:
* Fix sve2 ldnt1 and stnt1
* Fix pauth_check_trap vs SEL2
* Fix handling of LPAE block descriptors
* hw/dma/xlnx_csu_dma: Set TYPE_XLNX_CSU_DMA class_size
* hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init()
* nsis installer: List emulators in alphabetical order
* nsis installer: Suppress "ANSI targets are deprecated" warning
* nsis installer: Fix mouse-over descriptions for emulators
* hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
* Improve M-profile vector table access logging
* Xilinx ZynqMP: model CRF and APU control
* Fix compile issues on modern Solaris
----------------------------------------------------------------
Andrew Deason (3):
util/osdep: Avoid madvise proto on modern Solaris
hw/i386/acpi-build: Avoid 'sun' identifier
util/osdep: Remove some early cruft
Edgar E. Iglesias (6):
hw/arm/xlnx-zynqmp: Add an unimplemented SERDES area
target/arm: Make rvbar settable after realize
hw/misc: Add a model of the Xilinx ZynqMP CRF
hw/arm/xlnx-zynqmp: Connect the ZynqMP CRF
hw/misc: Add a model of the Xilinx ZynqMP APU Control
hw/arm/xlnx-zynqmp: Connect the ZynqMP APU Control
Eric Auger (2):
hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG
hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
Peter Maydell (8):
target/arm: Fix handling of LPAE block descriptors
hw/dma/xlnx_csu_dma: Set TYPE_XLNX_CSU_DMA class_size
hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init()
nsis installer: List emulators in alphabetical order
nsis installer: Suppress "ANSI targets are deprecated" warning
nsis installer: Fix mouse-over descriptions for emulators
target/arm: Log M-profile vector table accesses
target/arm: Log fault address for M-profile faults
Richard Henderson (2):
target/arm: Fix sve2 ldnt1 and stnt1
target/arm: Fix pauth_check_trap vs SEL2
meson.build | 23 ++-
include/hw/arm/xlnx-zynqmp.h | 4 +
include/hw/misc/xlnx-zynqmp-apu-ctrl.h | 93 ++++++++++++
include/hw/misc/xlnx-zynqmp-crf.h | 211 ++++++++++++++++++++++++++
include/qemu/osdep.h | 8 +
target/arm/cpu.h | 3 +-
target/arm/sve.decode | 5 +-
hw/arm/virt.c | 7 +-
hw/arm/xlnx-zynqmp.c | 46 +++++-
hw/dma/xlnx_csu_dma.c | 1 +
hw/i386/acpi-build.c | 4 +-
hw/misc/npcm7xx_clk.c | 4 +-
hw/misc/xlnx-zynqmp-apu-ctrl.c | 253 +++++++++++++++++++++++++++++++
hw/misc/xlnx-zynqmp-crf.c | 266 +++++++++++++++++++++++++++++++++
target/arm/cpu.c | 17 ++-
target/arm/helper.c | 20 ++-
target/arm/m_helper.c | 11 ++
target/arm/pauth_helper.c | 2 +-
target/arm/translate-sve.c | 51 ++++++-
tests/tcg/aarch64/test-826.c | 50 +++++++
util/osdep.c | 10 --
hw/intc/Kconfig | 2 +-
hw/intc/meson.build | 4 +-
hw/misc/meson.build | 2 +
qemu.nsi | 8 +-
scripts/nsis.py | 17 ++-
tests/tcg/aarch64/Makefile.target | 4 +
tests/tcg/configure.sh | 4 +
28 files changed, 1084 insertions(+), 46 deletions(-)
create mode 100644 include/hw/misc/xlnx-zynqmp-apu-ctrl.h
create mode 100644 include/hw/misc/xlnx-zynqmp-crf.h
create mode 100644 hw/misc/xlnx-zynqmp-apu-ctrl.c
create mode 100644 hw/misc/xlnx-zynqmp-crf.c
create mode 100644 tests/tcg/aarch64/test-826.c
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2022-03-18 13:22 Peter Maydell
@ 2022-03-19 10:09 ` Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2022-03-19 10:09 UTC (permalink / raw)
To: qemu-devel
On Fri, 18 Mar 2022 at 13:23, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Mostly straightforward bugfixes. The new Xilinx devices are
> arguably 'new feature', but they're fixing a regression where
> our changes to PSCI in commit 3f37979bf mean that EL3 guest
> code now needs to talk to a proper emulated power-controller
> device to turn on secondary CPUs; and it's not yet rc1 and
> they only affect the Xilinx board, so it seems OK to me.
>
> thanks
> -- PMM
>
> The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3:
>
> Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu into staging (2022-03-16 10:43:58 +0000)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220318
>
> for you to fetch changes up to 79d54c9eac04c554e3c081589542f801ace71797:
>
> util/osdep: Remove some early cruft (2022-03-18 11:32:13 +0000)
>
> ----------------------------------------------------------------
> target-arm queue:
> * Fix sve2 ldnt1 and stnt1
> * Fix pauth_check_trap vs SEL2
> * Fix handling of LPAE block descriptors
> * hw/dma/xlnx_csu_dma: Set TYPE_XLNX_CSU_DMA class_size
> * hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init()
> * nsis installer: List emulators in alphabetical order
> * nsis installer: Suppress "ANSI targets are deprecated" warning
> * nsis installer: Fix mouse-over descriptions for emulators
> * hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
> * Improve M-profile vector table access logging
> * Xilinx ZynqMP: model CRF and APU control
> * Fix compile issues on modern Solaris
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/7.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2023-03-06 15:34 Peter Maydell
2023-03-06 15:34 ` [PULL 01/21] target/arm: Normalize aarch64 gdbstub get/set function names Peter Maydell
` (21 more replies)
0 siblings, 22 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
The following changes since commit f003dd8d81f7d88f4b1f8802309eaa76f6eb223a:
Merge tag 'pull-tcg-20230305' of https://gitlab.com/rth7680/qemu into staging (2023-03-06 10:20:04 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230306
for you to fetch changes up to 2ddc45954f97cd1d7ee5cbca0def05e980d1da9f:
hw: arm: allwinner-h3: Fix and complete H3 i2c devices (2023-03-06 15:31:24 +0000)
----------------------------------------------------------------
target-arm queue:
* allwinner-h3: Fix I2C controller model for Sun6i SoCs
* allwinner-h3: Add missing i2c controllers
* Expose M-profile system registers to gdbstub
* Expose pauth information to gdbstub
* Support direct boot for Linux/arm64 EFI zboot images
* Fix incorrect stage 2 MMU setup validation
----------------------------------------------------------------
Ard Biesheuvel (1):
hw: arm: Support direct boot for Linux/arm64 EFI zboot images
David Reiss (2):
target/arm: Export arm_v7m_mrs_control
target/arm: Export arm_v7m_get_sp_ptr
Richard Henderson (16):
target/arm: Normalize aarch64 gdbstub get/set function names
target/arm: Unexport arm_gen_dynamic_sysreg_xml
target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c
target/arm: Split out output_vector_union_type
target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml
target/arm: Hoist pred_width in arm_gen_dynamic_svereg_xml
target/arm: Fix svep width in arm_gen_dynamic_svereg_xml
target/arm: Add name argument to output_vector_union_type
target/arm: Simplify iteration over bit widths
target/arm: Create pauth_ptr_mask
target/arm: Implement gdbstub pauth extension
target/arm: Implement gdbstub m-profile systemreg and secext
target/arm: Handle m-profile in arm_is_secure
target/arm: Stub arm_hcr_el2_eff for m-profile
target/arm: Diagnose incorrect usage of arm_is_secure subroutines
target/arm: Rewrite check_s2_mmu_setup
qianfan Zhao (2):
hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs
hw: arm: allwinner-h3: Fix and complete H3 i2c devices
configs/targets/aarch64-linux-user.mak | 2 +-
configs/targets/aarch64-softmmu.mak | 2 +-
configs/targets/aarch64_be-linux-user.mak | 2 +-
include/hw/arm/allwinner-h3.h | 6 +
include/hw/i2c/allwinner-i2c.h | 6 +
include/hw/loader.h | 19 ++
target/arm/cpu.h | 17 +-
target/arm/internals.h | 34 +++-
hw/arm/allwinner-h3.c | 29 +++-
hw/arm/boot.c | 6 +
hw/core/loader.c | 91 ++++++++++
hw/i2c/allwinner-i2c.c | 26 ++-
target/arm/gdbstub.c | 278 ++++++++++++++++++------------
target/arm/gdbstub64.c | 175 ++++++++++++++++++-
target/arm/helper.c | 3 +
target/arm/ptw.c | 173 +++++++++++--------
target/arm/tcg/m_helper.c | 90 +++++-----
target/arm/tcg/pauth_helper.c | 26 ++-
gdb-xml/aarch64-pauth.xml | 15 ++
19 files changed, 742 insertions(+), 258 deletions(-)
create mode 100644 gdb-xml/aarch64-pauth.xml
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 01/21] target/arm: Normalize aarch64 gdbstub get/set function names
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 02/21] target/arm: Unexport arm_gen_dynamic_sysreg_xml Peter Maydell
` (20 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Make the form of the function names between fp and sve the same:
- arm_gdb_*_svereg -> aarch64_gdb_*_sve_reg.
- aarch64_fpu_gdb_*_reg -> aarch64_gdb_*_fpu_reg.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 8 ++++----
target/arm/gdbstub.c | 9 +++++----
target/arm/gdbstub64.c | 8 ++++----
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 3c7341e7741..f99d0d98413 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1344,10 +1344,10 @@ static inline uint64_t pmu_counter_mask(CPUARMState *env)
}
#ifdef TARGET_AARCH64
-int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg);
-int arm_gdb_set_svereg(CPUARMState *env, uint8_t *buf, int reg);
-int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg);
-int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg);
+int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg);
+int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg);
+int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg);
+int aarch64_gdb_set_fpu_reg(CPUARMState *env, uint8_t *buf, int reg);
void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp);
void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp);
void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 2f806512d0a..cf1c01e3cf5 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -466,12 +466,13 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
*/
#ifdef TARGET_AARCH64
if (isar_feature_aa64_sve(&cpu->isar)) {
- gdb_register_coprocessor(cs, arm_gdb_get_svereg, arm_gdb_set_svereg,
- arm_gen_dynamic_svereg_xml(cs, cs->gdb_num_regs),
+ int nreg = arm_gen_dynamic_svereg_xml(cs, cs->gdb_num_regs);
+ gdb_register_coprocessor(cs, aarch64_gdb_get_sve_reg,
+ aarch64_gdb_set_sve_reg, nreg,
"sve-registers.xml", 0);
} else {
- gdb_register_coprocessor(cs, aarch64_fpu_gdb_get_reg,
- aarch64_fpu_gdb_set_reg,
+ gdb_register_coprocessor(cs, aarch64_gdb_get_fpu_reg,
+ aarch64_gdb_set_fpu_reg,
34, "aarch64-fpu.xml", 0);
}
#endif
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 07a6746944d..c598cb03759 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -72,7 +72,7 @@ int aarch64_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
return 0;
}
-int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg)
+int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg)
{
switch (reg) {
case 0 ... 31:
@@ -92,7 +92,7 @@ int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg)
}
}
-int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg)
+int aarch64_gdb_set_fpu_reg(CPUARMState *env, uint8_t *buf, int reg)
{
switch (reg) {
case 0 ... 31:
@@ -116,7 +116,7 @@ int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg)
}
}
-int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg)
+int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg)
{
ARMCPU *cpu = env_archcpu(env);
@@ -164,7 +164,7 @@ int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg)
return 0;
}
-int arm_gdb_set_svereg(CPUARMState *env, uint8_t *buf, int reg)
+int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
{
ARMCPU *cpu = env_archcpu(env);
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 02/21] target/arm: Unexport arm_gen_dynamic_sysreg_xml
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
2023-03-06 15:34 ` [PULL 01/21] target/arm: Normalize aarch64 gdbstub get/set function names Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 03/21] target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c Peter Maydell
` (19 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
This function is not used outside gdbstub.c.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 1 -
target/arm/gdbstub.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 787121694c5..209800d50df 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -1116,7 +1116,6 @@ int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
* Helpers to dynamically generates XML descriptions of the sysregs
* and SVE registers. Returns the number of registers in each set.
*/
-int arm_gen_dynamic_sysreg_xml(CPUState *cpu, int base_reg);
int arm_gen_dynamic_svereg_xml(CPUState *cpu, int base_reg);
/* Returns the dynamically generated XML for the gdb stub.
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index cf1c01e3cf5..52581e9784c 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -305,7 +305,7 @@ static void arm_register_sysreg_for_xml(gpointer key, gpointer value,
}
}
-int arm_gen_dynamic_sysreg_xml(CPUState *cs, int base_reg)
+static int arm_gen_dynamic_sysreg_xml(CPUState *cs, int base_reg)
{
ARMCPU *cpu = ARM_CPU(cs);
GString *s = g_string_new(NULL);
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 03/21] target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
2023-03-06 15:34 ` [PULL 01/21] target/arm: Normalize aarch64 gdbstub get/set function names Peter Maydell
2023-03-06 15:34 ` [PULL 02/21] target/arm: Unexport arm_gen_dynamic_sysreg_xml Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 04/21] target/arm: Split out output_vector_union_type Peter Maydell
` (18 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
The function is only used for aarch64, so move it to the
file that has the other aarch64 gdbstub stuff. Move the
declaration to internals.h.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 6 ---
target/arm/internals.h | 1 +
target/arm/gdbstub.c | 120 -----------------------------------------
target/arm/gdbstub64.c | 118 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 119 insertions(+), 126 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 209800d50df..379e74d1f99 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -1112,12 +1112,6 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
int arm_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
-/*
- * Helpers to dynamically generates XML descriptions of the sysregs
- * and SVE registers. Returns the number of registers in each set.
- */
-int arm_gen_dynamic_svereg_xml(CPUState *cpu, int base_reg);
-
/* Returns the dynamically generated XML for the gdb stub.
* Returns a pointer to the XML contents for the specified XML file or NULL
* if the XML name doesn't match the predefined one.
diff --git a/target/arm/internals.h b/target/arm/internals.h
index f99d0d98413..15988768be3 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1344,6 +1344,7 @@ static inline uint64_t pmu_counter_mask(CPUARMState *env)
}
#ifdef TARGET_AARCH64
+int arm_gen_dynamic_svereg_xml(CPUState *cpu, int base_reg);
int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg);
int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg);
int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg);
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 52581e9784c..bf8aff78241 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -322,126 +322,6 @@ static int arm_gen_dynamic_sysreg_xml(CPUState *cs, int base_reg)
return cpu->dyn_sysreg_xml.num;
}
-struct TypeSize {
- const char *gdb_type;
- int size;
- const char sz, suffix;
-};
-
-static const struct TypeSize vec_lanes[] = {
- /* quads */
- { "uint128", 128, 'q', 'u' },
- { "int128", 128, 'q', 's' },
- /* 64 bit */
- { "ieee_double", 64, 'd', 'f' },
- { "uint64", 64, 'd', 'u' },
- { "int64", 64, 'd', 's' },
- /* 32 bit */
- { "ieee_single", 32, 's', 'f' },
- { "uint32", 32, 's', 'u' },
- { "int32", 32, 's', 's' },
- /* 16 bit */
- { "ieee_half", 16, 'h', 'f' },
- { "uint16", 16, 'h', 'u' },
- { "int16", 16, 'h', 's' },
- /* bytes */
- { "uint8", 8, 'b', 'u' },
- { "int8", 8, 'b', 's' },
-};
-
-
-int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
-{
- ARMCPU *cpu = ARM_CPU(cs);
- GString *s = g_string_new(NULL);
- DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
- g_autoptr(GString) ts = g_string_new("");
- int i, j, bits, reg_width = (cpu->sve_max_vq * 128);
- info->num = 0;
- g_string_printf(s, "<?xml version=\"1.0\"?>");
- g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
- g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
-
- /* First define types and totals in a whole VL */
- for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) {
- int count = reg_width / vec_lanes[i].size;
- g_string_printf(ts, "svev%c%c", vec_lanes[i].sz, vec_lanes[i].suffix);
- g_string_append_printf(s,
- "<vector id=\"%s\" type=\"%s\" count=\"%d\"/>",
- ts->str, vec_lanes[i].gdb_type, count);
- }
- /*
- * Now define a union for each size group containing unsigned and
- * signed and potentially float versions of each size from 128 to
- * 8 bits.
- */
- for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- const char suf[] = { 'q', 'd', 's', 'h', 'b' };
- g_string_append_printf(s, "<union id=\"svevn%c\">", suf[i]);
- for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) {
- if (vec_lanes[j].size == bits) {
- g_string_append_printf(s, "<field name=\"%c\" type=\"svev%c%c\"/>",
- vec_lanes[j].suffix,
- vec_lanes[j].sz, vec_lanes[j].suffix);
- }
- }
- g_string_append(s, "</union>");
- }
- /* And now the final union of unions */
- g_string_append(s, "<union id=\"svev\">");
- for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- const char suf[] = { 'q', 'd', 's', 'h', 'b' };
- g_string_append_printf(s, "<field name=\"%c\" type=\"svevn%c\"/>",
- suf[i], suf[i]);
- }
- g_string_append(s, "</union>");
-
- /* Finally the sve prefix type */
- g_string_append_printf(s,
- "<vector id=\"svep\" type=\"uint8\" count=\"%d\"/>",
- reg_width / 8);
-
- /* Then define each register in parts for each vq */
- for (i = 0; i < 32; i++) {
- g_string_append_printf(s,
- "<reg name=\"z%d\" bitsize=\"%d\""
- " regnum=\"%d\" type=\"svev\"/>",
- i, reg_width, base_reg++);
- info->num++;
- }
- /* fpscr & status registers */
- g_string_append_printf(s, "<reg name=\"fpsr\" bitsize=\"32\""
- " regnum=\"%d\" group=\"float\""
- " type=\"int\"/>", base_reg++);
- g_string_append_printf(s, "<reg name=\"fpcr\" bitsize=\"32\""
- " regnum=\"%d\" group=\"float\""
- " type=\"int\"/>", base_reg++);
- info->num += 2;
-
- for (i = 0; i < 16; i++) {
- g_string_append_printf(s,
- "<reg name=\"p%d\" bitsize=\"%d\""
- " regnum=\"%d\" type=\"svep\"/>",
- i, cpu->sve_max_vq * 16, base_reg++);
- info->num++;
- }
- g_string_append_printf(s,
- "<reg name=\"ffr\" bitsize=\"%d\""
- " regnum=\"%d\" group=\"vector\""
- " type=\"svep\"/>",
- cpu->sve_max_vq * 16, base_reg++);
- g_string_append_printf(s,
- "<reg name=\"vg\" bitsize=\"64\""
- " regnum=\"%d\" type=\"int\"/>",
- base_reg++);
- info->num += 2;
- g_string_append_printf(s, "</feature>");
- cpu->dyn_svereg_xml.desc = g_string_free(s, false);
-
- return cpu->dyn_svereg_xml.num;
-}
-
-
const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
{
ARMCPU *cpu = ARM_CPU(cs);
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index c598cb03759..59fb5465d5c 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -209,3 +209,121 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
return 0;
}
+
+struct TypeSize {
+ const char *gdb_type;
+ short size;
+ char sz, suffix;
+};
+
+static const struct TypeSize vec_lanes[] = {
+ /* quads */
+ { "uint128", 128, 'q', 'u' },
+ { "int128", 128, 'q', 's' },
+ /* 64 bit */
+ { "ieee_double", 64, 'd', 'f' },
+ { "uint64", 64, 'd', 'u' },
+ { "int64", 64, 'd', 's' },
+ /* 32 bit */
+ { "ieee_single", 32, 's', 'f' },
+ { "uint32", 32, 's', 'u' },
+ { "int32", 32, 's', 's' },
+ /* 16 bit */
+ { "ieee_half", 16, 'h', 'f' },
+ { "uint16", 16, 'h', 'u' },
+ { "int16", 16, 'h', 's' },
+ /* bytes */
+ { "uint8", 8, 'b', 'u' },
+ { "int8", 8, 'b', 's' },
+};
+
+int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
+{
+ ARMCPU *cpu = ARM_CPU(cs);
+ GString *s = g_string_new(NULL);
+ DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
+ g_autoptr(GString) ts = g_string_new("");
+ int i, j, bits, reg_width = (cpu->sve_max_vq * 128);
+ info->num = 0;
+ g_string_printf(s, "<?xml version=\"1.0\"?>");
+ g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
+ g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
+
+ /* First define types and totals in a whole VL */
+ for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) {
+ int count = reg_width / vec_lanes[i].size;
+ g_string_printf(ts, "svev%c%c", vec_lanes[i].sz, vec_lanes[i].suffix);
+ g_string_append_printf(s,
+ "<vector id=\"%s\" type=\"%s\" count=\"%d\"/>",
+ ts->str, vec_lanes[i].gdb_type, count);
+ }
+ /*
+ * Now define a union for each size group containing unsigned and
+ * signed and potentially float versions of each size from 128 to
+ * 8 bits.
+ */
+ for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
+ const char suf[] = { 'q', 'd', 's', 'h', 'b' };
+ g_string_append_printf(s, "<union id=\"svevn%c\">", suf[i]);
+ for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) {
+ if (vec_lanes[j].size == bits) {
+ g_string_append_printf(s, "<field name=\"%c\" type=\"svev%c%c\"/>",
+ vec_lanes[j].suffix,
+ vec_lanes[j].sz, vec_lanes[j].suffix);
+ }
+ }
+ g_string_append(s, "</union>");
+ }
+ /* And now the final union of unions */
+ g_string_append(s, "<union id=\"svev\">");
+ for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
+ const char suf[] = { 'q', 'd', 's', 'h', 'b' };
+ g_string_append_printf(s, "<field name=\"%c\" type=\"svevn%c\"/>",
+ suf[i], suf[i]);
+ }
+ g_string_append(s, "</union>");
+
+ /* Finally the sve prefix type */
+ g_string_append_printf(s,
+ "<vector id=\"svep\" type=\"uint8\" count=\"%d\"/>",
+ reg_width / 8);
+
+ /* Then define each register in parts for each vq */
+ for (i = 0; i < 32; i++) {
+ g_string_append_printf(s,
+ "<reg name=\"z%d\" bitsize=\"%d\""
+ " regnum=\"%d\" type=\"svev\"/>",
+ i, reg_width, base_reg++);
+ info->num++;
+ }
+ /* fpscr & status registers */
+ g_string_append_printf(s, "<reg name=\"fpsr\" bitsize=\"32\""
+ " regnum=\"%d\" group=\"float\""
+ " type=\"int\"/>", base_reg++);
+ g_string_append_printf(s, "<reg name=\"fpcr\" bitsize=\"32\""
+ " regnum=\"%d\" group=\"float\""
+ " type=\"int\"/>", base_reg++);
+ info->num += 2;
+
+ for (i = 0; i < 16; i++) {
+ g_string_append_printf(s,
+ "<reg name=\"p%d\" bitsize=\"%d\""
+ " regnum=\"%d\" type=\"svep\"/>",
+ i, cpu->sve_max_vq * 16, base_reg++);
+ info->num++;
+ }
+ g_string_append_printf(s,
+ "<reg name=\"ffr\" bitsize=\"%d\""
+ " regnum=\"%d\" group=\"vector\""
+ " type=\"svep\"/>",
+ cpu->sve_max_vq * 16, base_reg++);
+ g_string_append_printf(s,
+ "<reg name=\"vg\" bitsize=\"64\""
+ " regnum=\"%d\" type=\"int\"/>",
+ base_reg++);
+ info->num += 2;
+ g_string_append_printf(s, "</feature>");
+ info->desc = g_string_free(s, false);
+
+ return info->num;
+}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 04/21] target/arm: Split out output_vector_union_type
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (2 preceding siblings ...)
2023-03-06 15:34 ` [PULL 03/21] target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 05/21] target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml Peter Maydell
` (17 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Create a subroutine for creating the union of unions
of the various type sizes that a vector may contain.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 83 +++++++++++++++++++++++-------------------
1 file changed, 45 insertions(+), 38 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 59fb5465d5c..811833d8dec 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -210,44 +210,39 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
return 0;
}
-struct TypeSize {
- const char *gdb_type;
- short size;
- char sz, suffix;
-};
-
-static const struct TypeSize vec_lanes[] = {
- /* quads */
- { "uint128", 128, 'q', 'u' },
- { "int128", 128, 'q', 's' },
- /* 64 bit */
- { "ieee_double", 64, 'd', 'f' },
- { "uint64", 64, 'd', 'u' },
- { "int64", 64, 'd', 's' },
- /* 32 bit */
- { "ieee_single", 32, 's', 'f' },
- { "uint32", 32, 's', 'u' },
- { "int32", 32, 's', 's' },
- /* 16 bit */
- { "ieee_half", 16, 'h', 'f' },
- { "uint16", 16, 'h', 'u' },
- { "int16", 16, 'h', 's' },
- /* bytes */
- { "uint8", 8, 'b', 'u' },
- { "int8", 8, 'b', 's' },
-};
-
-int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
+static void output_vector_union_type(GString *s, int reg_width)
{
- ARMCPU *cpu = ARM_CPU(cs);
- GString *s = g_string_new(NULL);
- DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
+ struct TypeSize {
+ const char *gdb_type;
+ short size;
+ char sz, suffix;
+ };
+
+ static const struct TypeSize vec_lanes[] = {
+ /* quads */
+ { "uint128", 128, 'q', 'u' },
+ { "int128", 128, 'q', 's' },
+ /* 64 bit */
+ { "ieee_double", 64, 'd', 'f' },
+ { "uint64", 64, 'd', 'u' },
+ { "int64", 64, 'd', 's' },
+ /* 32 bit */
+ { "ieee_single", 32, 's', 'f' },
+ { "uint32", 32, 's', 'u' },
+ { "int32", 32, 's', 's' },
+ /* 16 bit */
+ { "ieee_half", 16, 'h', 'f' },
+ { "uint16", 16, 'h', 'u' },
+ { "int16", 16, 'h', 's' },
+ /* bytes */
+ { "uint8", 8, 'b', 'u' },
+ { "int8", 8, 'b', 's' },
+ };
+
+ static const char suf[] = { 'q', 'd', 's', 'h', 'b' };
+
g_autoptr(GString) ts = g_string_new("");
- int i, j, bits, reg_width = (cpu->sve_max_vq * 128);
- info->num = 0;
- g_string_printf(s, "<?xml version=\"1.0\"?>");
- g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
- g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
+ int i, j, bits;
/* First define types and totals in a whole VL */
for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) {
@@ -263,7 +258,6 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
* 8 bits.
*/
for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- const char suf[] = { 'q', 'd', 's', 'h', 'b' };
g_string_append_printf(s, "<union id=\"svevn%c\">", suf[i]);
for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) {
if (vec_lanes[j].size == bits) {
@@ -277,11 +271,24 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
/* And now the final union of unions */
g_string_append(s, "<union id=\"svev\">");
for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- const char suf[] = { 'q', 'd', 's', 'h', 'b' };
g_string_append_printf(s, "<field name=\"%c\" type=\"svevn%c\"/>",
suf[i], suf[i]);
}
g_string_append(s, "</union>");
+}
+
+int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
+{
+ ARMCPU *cpu = ARM_CPU(cs);
+ GString *s = g_string_new(NULL);
+ DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
+ int i, reg_width = (cpu->sve_max_vq * 128);
+ info->num = 0;
+ g_string_printf(s, "<?xml version=\"1.0\"?>");
+ g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
+ g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
+
+ output_vector_union_type(s, reg_width);
/* Finally the sve prefix type */
g_string_append_printf(s,
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 05/21] target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (3 preceding siblings ...)
2023-03-06 15:34 ` [PULL 04/21] target/arm: Split out output_vector_union_type Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 06/21] target/arm: Hoist pred_width " Peter Maydell
` (16 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Rather than increment base_reg and num, compute num from the change
to base_reg at the end. Clean up some nearby comments.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 811833d8dec..070ba20d991 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -277,32 +277,35 @@ static void output_vector_union_type(GString *s, int reg_width)
g_string_append(s, "</union>");
}
-int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
+int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg)
{
ARMCPU *cpu = ARM_CPU(cs);
GString *s = g_string_new(NULL);
DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
- int i, reg_width = (cpu->sve_max_vq * 128);
- info->num = 0;
+ int reg_width = cpu->sve_max_vq * 128;
+ int base_reg = orig_base_reg;
+ int i;
+
g_string_printf(s, "<?xml version=\"1.0\"?>");
g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
+ /* Create the vector union type. */
output_vector_union_type(s, reg_width);
- /* Finally the sve prefix type */
+ /* Create the predicate vector type. */
g_string_append_printf(s,
"<vector id=\"svep\" type=\"uint8\" count=\"%d\"/>",
reg_width / 8);
- /* Then define each register in parts for each vq */
+ /* Define the vector registers. */
for (i = 0; i < 32; i++) {
g_string_append_printf(s,
"<reg name=\"z%d\" bitsize=\"%d\""
" regnum=\"%d\" type=\"svev\"/>",
i, reg_width, base_reg++);
- info->num++;
}
+
/* fpscr & status registers */
g_string_append_printf(s, "<reg name=\"fpsr\" bitsize=\"32\""
" regnum=\"%d\" group=\"float\""
@@ -310,27 +313,29 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg)
g_string_append_printf(s, "<reg name=\"fpcr\" bitsize=\"32\""
" regnum=\"%d\" group=\"float\""
" type=\"int\"/>", base_reg++);
- info->num += 2;
+ /* Define the predicate registers. */
for (i = 0; i < 16; i++) {
g_string_append_printf(s,
"<reg name=\"p%d\" bitsize=\"%d\""
" regnum=\"%d\" type=\"svep\"/>",
i, cpu->sve_max_vq * 16, base_reg++);
- info->num++;
}
g_string_append_printf(s,
"<reg name=\"ffr\" bitsize=\"%d\""
" regnum=\"%d\" group=\"vector\""
" type=\"svep\"/>",
cpu->sve_max_vq * 16, base_reg++);
+
+ /* Define the vector length pseudo-register. */
g_string_append_printf(s,
"<reg name=\"vg\" bitsize=\"64\""
" regnum=\"%d\" type=\"int\"/>",
base_reg++);
- info->num += 2;
- g_string_append_printf(s, "</feature>");
- info->desc = g_string_free(s, false);
+ g_string_append_printf(s, "</feature>");
+
+ info->desc = g_string_free(s, false);
+ info->num = base_reg - orig_base_reg;
return info->num;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 06/21] target/arm: Hoist pred_width in arm_gen_dynamic_svereg_xml
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (4 preceding siblings ...)
2023-03-06 15:34 ` [PULL 05/21] target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 07/21] target/arm: Fix svep width " Peter Maydell
` (15 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 070ba20d991..895e19f0845 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -283,6 +283,7 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg)
GString *s = g_string_new(NULL);
DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml;
int reg_width = cpu->sve_max_vq * 128;
+ int pred_width = cpu->sve_max_vq * 16;
int base_reg = orig_base_reg;
int i;
@@ -319,13 +320,13 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg)
g_string_append_printf(s,
"<reg name=\"p%d\" bitsize=\"%d\""
" regnum=\"%d\" type=\"svep\"/>",
- i, cpu->sve_max_vq * 16, base_reg++);
+ i, pred_width, base_reg++);
}
g_string_append_printf(s,
"<reg name=\"ffr\" bitsize=\"%d\""
" regnum=\"%d\" group=\"vector\""
" type=\"svep\"/>",
- cpu->sve_max_vq * 16, base_reg++);
+ pred_width, base_reg++);
/* Define the vector length pseudo-register. */
g_string_append_printf(s,
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 07/21] target/arm: Fix svep width in arm_gen_dynamic_svereg_xml
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (5 preceding siblings ...)
2023-03-06 15:34 ` [PULL 06/21] target/arm: Hoist pred_width " Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 08/21] target/arm: Add name argument to output_vector_union_type Peter Maydell
` (14 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Define svep based on the size of the predicates,
not the primary vector registers.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 895e19f0845..d0e1305f6fc 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -297,7 +297,7 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg)
/* Create the predicate vector type. */
g_string_append_printf(s,
"<vector id=\"svep\" type=\"uint8\" count=\"%d\"/>",
- reg_width / 8);
+ pred_width / 8);
/* Define the vector registers. */
for (i = 0; i < 32; i++) {
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 08/21] target/arm: Add name argument to output_vector_union_type
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (6 preceding siblings ...)
2023-03-06 15:34 ` [PULL 07/21] target/arm: Fix svep width " Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 09/21] target/arm: Simplify iteration over bit widths Peter Maydell
` (13 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
This will make the function usable between SVE and SME.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index d0e1305f6fc..36166bf81eb 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -210,7 +210,8 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
return 0;
}
-static void output_vector_union_type(GString *s, int reg_width)
+static void output_vector_union_type(GString *s, int reg_width,
+ const char *name)
{
struct TypeSize {
const char *gdb_type;
@@ -240,39 +241,38 @@ static void output_vector_union_type(GString *s, int reg_width)
};
static const char suf[] = { 'q', 'd', 's', 'h', 'b' };
-
- g_autoptr(GString) ts = g_string_new("");
int i, j, bits;
/* First define types and totals in a whole VL */
for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) {
- int count = reg_width / vec_lanes[i].size;
- g_string_printf(ts, "svev%c%c", vec_lanes[i].sz, vec_lanes[i].suffix);
g_string_append_printf(s,
- "<vector id=\"%s\" type=\"%s\" count=\"%d\"/>",
- ts->str, vec_lanes[i].gdb_type, count);
+ "<vector id=\"%s%c%c\" type=\"%s\" count=\"%d\"/>",
+ name, vec_lanes[i].sz, vec_lanes[i].suffix,
+ vec_lanes[i].gdb_type, reg_width / vec_lanes[i].size);
}
+
/*
* Now define a union for each size group containing unsigned and
* signed and potentially float versions of each size from 128 to
* 8 bits.
*/
for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- g_string_append_printf(s, "<union id=\"svevn%c\">", suf[i]);
+ g_string_append_printf(s, "<union id=\"%sn%c\">", name, suf[i]);
for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) {
if (vec_lanes[j].size == bits) {
- g_string_append_printf(s, "<field name=\"%c\" type=\"svev%c%c\"/>",
- vec_lanes[j].suffix,
+ g_string_append_printf(s, "<field name=\"%c\" type=\"%s%c%c\"/>",
+ vec_lanes[j].suffix, name,
vec_lanes[j].sz, vec_lanes[j].suffix);
}
}
g_string_append(s, "</union>");
}
+
/* And now the final union of unions */
- g_string_append(s, "<union id=\"svev\">");
+ g_string_append_printf(s, "<union id=\"%s\">", name);
for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
- g_string_append_printf(s, "<field name=\"%c\" type=\"svevn%c\"/>",
- suf[i], suf[i]);
+ g_string_append_printf(s, "<field name=\"%c\" type=\"%sn%c\"/>",
+ suf[i], name, suf[i]);
}
g_string_append(s, "</union>");
}
@@ -292,7 +292,7 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg)
g_string_append_printf(s, "<feature name=\"org.gnu.gdb.aarch64.sve\">");
/* Create the vector union type. */
- output_vector_union_type(s, reg_width);
+ output_vector_union_type(s, reg_width, "svev");
/* Create the predicate vector type. */
g_string_append_printf(s,
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 09/21] target/arm: Simplify iteration over bit widths
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (7 preceding siblings ...)
2023-03-06 15:34 ` [PULL 08/21] target/arm: Add name argument to output_vector_union_type Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 10/21] target/arm: Create pauth_ptr_mask Peter Maydell
` (12 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Order suf[] by the log8 of the width.
Use ARRAY_SIZE instead of hard-coding 128.
This changes the order of the union definitions,
but retains the order of the union-of-union members.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/gdbstub64.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 36166bf81eb..3d9e9e97c86 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -240,8 +240,8 @@ static void output_vector_union_type(GString *s, int reg_width,
{ "int8", 8, 'b', 's' },
};
- static const char suf[] = { 'q', 'd', 's', 'h', 'b' };
- int i, j, bits;
+ static const char suf[] = { 'b', 'h', 's', 'd', 'q' };
+ int i, j;
/* First define types and totals in a whole VL */
for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) {
@@ -256,7 +256,9 @@ static void output_vector_union_type(GString *s, int reg_width,
* signed and potentially float versions of each size from 128 to
* 8 bits.
*/
- for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
+ for (i = 0; i < ARRAY_SIZE(suf); i++) {
+ int bits = 8 << i;
+
g_string_append_printf(s, "<union id=\"%sn%c\">", name, suf[i]);
for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) {
if (vec_lanes[j].size == bits) {
@@ -270,7 +272,7 @@ static void output_vector_union_type(GString *s, int reg_width,
/* And now the final union of unions */
g_string_append_printf(s, "<union id=\"%s\">", name);
- for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) {
+ for (i = ARRAY_SIZE(suf) - 1; i >= 0; i--) {
g_string_append_printf(s, "<field name=\"%c\" type=\"%sn%c\"/>",
suf[i], name, suf[i]);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 10/21] target/arm: Create pauth_ptr_mask
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (8 preceding siblings ...)
2023-03-06 15:34 ` [PULL 09/21] target/arm: Simplify iteration over bit widths Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 11/21] target/arm: Implement gdbstub pauth extension Peter Maydell
` (11 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Keep the logic for pauth within pauth_helper.c, and expose
a helper function for use with the gdbstub pac extension.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 10 ++++++++++
target/arm/tcg/pauth_helper.c | 26 ++++++++++++++++++++++----
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 15988768be3..c891c7a3831 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1368,6 +1368,16 @@ int exception_target_el(CPUARMState *env);
bool arm_singlestep_active(CPUARMState *env);
bool arm_generate_debug_exceptions(CPUARMState *env);
+/**
+ * pauth_ptr_mask:
+ * @env: cpu context
+ * @ptr: selects between TTBR0 and TTBR1
+ * @data: selects between TBI and TBID
+ *
+ * Return a mask of the bits of @ptr that contain the authentication code.
+ */
+uint64_t pauth_ptr_mask(CPUARMState *env, uint64_t ptr, bool data);
+
/* Add the cpreg definitions for debug related system registers */
void define_debug_regs(ARMCPU *cpu);
diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c
index d0483bf051e..20f347332dc 100644
--- a/target/arm/tcg/pauth_helper.c
+++ b/target/arm/tcg/pauth_helper.c
@@ -339,14 +339,32 @@ static uint64_t pauth_addpac(CPUARMState *env, uint64_t ptr, uint64_t modifier,
return pac | ext | ptr;
}
-static uint64_t pauth_original_ptr(uint64_t ptr, ARMVAParameters param)
+static uint64_t pauth_ptr_mask_internal(ARMVAParameters param)
{
- /* Note that bit 55 is used whether or not the regime has 2 ranges. */
- uint64_t extfield = sextract64(ptr, 55, 1);
int bot_pac_bit = 64 - param.tsz;
int top_pac_bit = 64 - 8 * param.tbi;
- return deposit64(ptr, bot_pac_bit, top_pac_bit - bot_pac_bit, extfield);
+ return MAKE_64BIT_MASK(bot_pac_bit, top_pac_bit - bot_pac_bit);
+}
+
+static uint64_t pauth_original_ptr(uint64_t ptr, ARMVAParameters param)
+{
+ uint64_t mask = pauth_ptr_mask_internal(param);
+
+ /* Note that bit 55 is used whether or not the regime has 2 ranges. */
+ if (extract64(ptr, 55, 1)) {
+ return ptr | mask;
+ } else {
+ return ptr & ~mask;
+ }
+}
+
+uint64_t pauth_ptr_mask(CPUARMState *env, uint64_t ptr, bool data)
+{
+ ARMMMUIdx mmu_idx = arm_stage1_mmu_idx(env);
+ ARMVAParameters param = aa64_va_parameters(env, ptr, mmu_idx, data);
+
+ return pauth_ptr_mask_internal(param);
}
static uint64_t pauth_auth(CPUARMState *env, uint64_t ptr, uint64_t modifier,
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 11/21] target/arm: Implement gdbstub pauth extension
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (9 preceding siblings ...)
2023-03-06 15:34 ` [PULL 10/21] target/arm: Create pauth_ptr_mask Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 12/21] target/arm: Export arm_v7m_mrs_control Peter Maydell
` (10 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
The extension is primarily defined by the Linux kernel NT_ARM_PAC_MASK
ptrace register set.
The original gdb feature consists of two masks, data and code, which are
used to mask out the authentication code within a pointer. Following
discussion with Luis Machado, add two more masks in order to support
pointers within the high half of the address space (i.e. TTBR1 vs TTBR0).
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1105
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
configs/targets/aarch64-linux-user.mak | 2 +-
configs/targets/aarch64-softmmu.mak | 2 +-
configs/targets/aarch64_be-linux-user.mak | 2 +-
target/arm/internals.h | 2 ++
target/arm/gdbstub.c | 5 ++++
target/arm/gdbstub64.c | 34 +++++++++++++++++++++++
gdb-xml/aarch64-pauth.xml | 15 ++++++++++
7 files changed, 59 insertions(+), 3 deletions(-)
create mode 100644 gdb-xml/aarch64-pauth.xml
diff --git a/configs/targets/aarch64-linux-user.mak b/configs/targets/aarch64-linux-user.mak
index db552f18390..ba8bc5fe3fd 100644
--- a/configs/targets/aarch64-linux-user.mak
+++ b/configs/targets/aarch64-linux-user.mak
@@ -1,6 +1,6 @@
TARGET_ARCH=aarch64
TARGET_BASE_ARCH=arm
-TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml
+TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml
TARGET_HAS_BFLT=y
CONFIG_SEMIHOSTING=y
CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
diff --git a/configs/targets/aarch64-softmmu.mak b/configs/targets/aarch64-softmmu.mak
index d489e6da830..b4338e95680 100644
--- a/configs/targets/aarch64-softmmu.mak
+++ b/configs/targets/aarch64-softmmu.mak
@@ -1,5 +1,5 @@
TARGET_ARCH=aarch64
TARGET_BASE_ARCH=arm
TARGET_SUPPORTS_MTTCG=y
-TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml
+TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml gdb-xml/aarch64-pauth.xml
TARGET_NEED_FDT=y
diff --git a/configs/targets/aarch64_be-linux-user.mak b/configs/targets/aarch64_be-linux-user.mak
index dc78044fb15..acb5620cdbf 100644
--- a/configs/targets/aarch64_be-linux-user.mak
+++ b/configs/targets/aarch64_be-linux-user.mak
@@ -1,7 +1,7 @@
TARGET_ARCH=aarch64
TARGET_BASE_ARCH=arm
TARGET_BIG_ENDIAN=y
-TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml
+TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml
TARGET_HAS_BFLT=y
CONFIG_SEMIHOSTING=y
CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
diff --git a/target/arm/internals.h b/target/arm/internals.h
index c891c7a3831..dda89aa5dff 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1349,6 +1349,8 @@ int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg);
int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg);
int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg);
int aarch64_gdb_set_fpu_reg(CPUARMState *env, uint8_t *buf, int reg);
+int aarch64_gdb_get_pauth_reg(CPUARMState *env, GByteArray *buf, int reg);
+int aarch64_gdb_set_pauth_reg(CPUARMState *env, uint8_t *buf, int reg);
void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp);
void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp);
void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index bf8aff78241..062c8d447a0 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -355,6 +355,11 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
aarch64_gdb_set_fpu_reg,
34, "aarch64-fpu.xml", 0);
}
+ if (isar_feature_aa64_pauth(&cpu->isar)) {
+ gdb_register_coprocessor(cs, aarch64_gdb_get_pauth_reg,
+ aarch64_gdb_set_pauth_reg,
+ 4, "aarch64-pauth.xml", 0);
+ }
#endif
} else {
if (arm_feature(env, ARM_FEATURE_NEON)) {
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 3d9e9e97c86..3bee892fb76 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -210,6 +210,40 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
return 0;
}
+int aarch64_gdb_get_pauth_reg(CPUARMState *env, GByteArray *buf, int reg)
+{
+ switch (reg) {
+ case 0: /* pauth_dmask */
+ case 1: /* pauth_cmask */
+ case 2: /* pauth_dmask_high */
+ case 3: /* pauth_cmask_high */
+ /*
+ * Note that older versions of this feature only contained
+ * pauth_{d,c}mask, for use with Linux user processes, and
+ * thus exclusively in the low half of the address space.
+ *
+ * To support system mode, and to debug kernels, two new regs
+ * were added to cover the high half of the address space.
+ * For the purpose of pauth_ptr_mask, we can use any well-formed
+ * address within the address space half -- here, 0 and -1.
+ */
+ {
+ bool is_data = !(reg & 1);
+ bool is_high = reg & 2;
+ uint64_t mask = pauth_ptr_mask(env, -is_high, is_data);
+ return gdb_get_reg64(buf, mask);
+ }
+ default:
+ return 0;
+ }
+}
+
+int aarch64_gdb_set_pauth_reg(CPUARMState *env, uint8_t *buf, int reg)
+{
+ /* All pseudo registers are read-only. */
+ return 0;
+}
+
static void output_vector_union_type(GString *s, int reg_width,
const char *name)
{
diff --git a/gdb-xml/aarch64-pauth.xml b/gdb-xml/aarch64-pauth.xml
new file mode 100644
index 00000000000..24af5f903c1
--- /dev/null
+++ b/gdb-xml/aarch64-pauth.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.aarch64.pauth">
+ <reg name="pauth_dmask" bitsize="64"/>
+ <reg name="pauth_cmask" bitsize="64"/>
+ <reg name="pauth_dmask_high" bitsize="64"/>
+ <reg name="pauth_cmask_high" bitsize="64"/>
+</feature>
+
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 12/21] target/arm: Export arm_v7m_mrs_control
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (10 preceding siblings ...)
2023-03-06 15:34 ` [PULL 11/21] target/arm: Implement gdbstub pauth extension Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 13/21] target/arm: Export arm_v7m_get_sp_ptr Peter Maydell
` (9 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: David Reiss <dreiss@meta.com>
Allow the function to be used outside of m_helper.c.
Rename with an "arm_" prefix.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-13-richard.henderson@linaro.org
[rth: Split out of a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 3 +++
target/arm/tcg/m_helper.c | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index dda89aa5dff..086e88e2377 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1357,6 +1357,9 @@ void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp);
#endif
+/* Read the CONTROL register as the MRS instruction would. */
+uint32_t arm_v7m_mrs_control(CPUARMState *env, uint32_t secure);
+
#ifdef CONFIG_USER_ONLY
static inline void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu) { }
#else
diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
index f94e87e7289..03be79e7bfa 100644
--- a/target/arm/tcg/m_helper.c
+++ b/target/arm/tcg/m_helper.c
@@ -56,7 +56,7 @@ static uint32_t v7m_mrs_xpsr(CPUARMState *env, uint32_t reg, unsigned el)
return xpsr_read(env) & mask;
}
-static uint32_t v7m_mrs_control(CPUARMState *env, uint32_t secure)
+uint32_t arm_v7m_mrs_control(CPUARMState *env, uint32_t secure)
{
uint32_t value = env->v7m.control[secure];
@@ -93,7 +93,7 @@ uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
case 0 ... 7: /* xPSR sub-fields */
return v7m_mrs_xpsr(env, reg, 0);
case 20: /* CONTROL */
- return v7m_mrs_control(env, 0);
+ return arm_v7m_mrs_control(env, 0);
default:
/* Unprivileged reads others as zero. */
return 0;
@@ -2465,7 +2465,7 @@ uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
case 0 ... 7: /* xPSR sub-fields */
return v7m_mrs_xpsr(env, reg, el);
case 20: /* CONTROL */
- return v7m_mrs_control(env, env->v7m.secure);
+ return arm_v7m_mrs_control(env, env->v7m.secure);
case 0x94: /* CONTROL_NS */
/*
* We have to handle this here because unprivileged Secure code
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 13/21] target/arm: Export arm_v7m_get_sp_ptr
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (11 preceding siblings ...)
2023-03-06 15:34 ` [PULL 12/21] target/arm: Export arm_v7m_mrs_control Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 14/21] target/arm: Implement gdbstub m-profile systemreg and secext Peter Maydell
` (8 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: David Reiss <dreiss@meta.com>
Allow the function to be used outside of m_helper.c.
Move to be outside of ifndef CONFIG_USER_ONLY block.
Rename from get_v7m_sp_ptr.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-14-richard.henderson@linaro.org
[rth: Split out of a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 10 +++++
target/arm/tcg/m_helper.c | 84 +++++++++++++++++++--------------------
2 files changed, 51 insertions(+), 43 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 086e88e2377..b1ef05963f8 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1360,6 +1360,16 @@ void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp);
/* Read the CONTROL register as the MRS instruction would. */
uint32_t arm_v7m_mrs_control(CPUARMState *env, uint32_t secure);
+/*
+ * Return a pointer to the location where we currently store the
+ * stack pointer for the requested security state and thread mode.
+ * This pointer will become invalid if the CPU state is updated
+ * such that the stack pointers are switched around (eg changing
+ * the SPSEL control bit).
+ */
+uint32_t *arm_v7m_get_sp_ptr(CPUARMState *env, bool secure,
+ bool threadmode, bool spsel);
+
#ifdef CONFIG_USER_ONLY
static inline void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu) { }
#else
diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
index 03be79e7bfa..081fc3f5f75 100644
--- a/target/arm/tcg/m_helper.c
+++ b/target/arm/tcg/m_helper.c
@@ -650,42 +650,6 @@ void HELPER(v7m_blxns)(CPUARMState *env, uint32_t dest)
arm_rebuild_hflags(env);
}
-static uint32_t *get_v7m_sp_ptr(CPUARMState *env, bool secure, bool threadmode,
- bool spsel)
-{
- /*
- * Return a pointer to the location where we currently store the
- * stack pointer for the requested security state and thread mode.
- * This pointer will become invalid if the CPU state is updated
- * such that the stack pointers are switched around (eg changing
- * the SPSEL control bit).
- * Compare the v8M ARM ARM pseudocode LookUpSP_with_security_mode().
- * Unlike that pseudocode, we require the caller to pass us in the
- * SPSEL control bit value; this is because we also use this
- * function in handling of pushing of the callee-saves registers
- * part of the v8M stack frame (pseudocode PushCalleeStack()),
- * and in the tailchain codepath the SPSEL bit comes from the exception
- * return magic LR value from the previous exception. The pseudocode
- * opencodes the stack-selection in PushCalleeStack(), but we prefer
- * to make this utility function generic enough to do the job.
- */
- bool want_psp = threadmode && spsel;
-
- if (secure == env->v7m.secure) {
- if (want_psp == v7m_using_psp(env)) {
- return &env->regs[13];
- } else {
- return &env->v7m.other_sp;
- }
- } else {
- if (want_psp) {
- return &env->v7m.other_ss_psp;
- } else {
- return &env->v7m.other_ss_msp;
- }
- }
-}
-
static bool arm_v7m_load_vector(ARMCPU *cpu, int exc, bool targets_secure,
uint32_t *pvec)
{
@@ -810,8 +774,8 @@ static bool v7m_push_callee_stack(ARMCPU *cpu, uint32_t lr, bool dotailchain,
!mode;
mmu_idx = arm_v7m_mmu_idx_for_secstate_and_priv(env, M_REG_S, priv);
- frame_sp_p = get_v7m_sp_ptr(env, M_REG_S, mode,
- lr & R_V7M_EXCRET_SPSEL_MASK);
+ frame_sp_p = arm_v7m_get_sp_ptr(env, M_REG_S, mode,
+ lr & R_V7M_EXCRET_SPSEL_MASK);
want_psp = mode && (lr & R_V7M_EXCRET_SPSEL_MASK);
if (want_psp) {
limit = env->v7m.psplim[M_REG_S];
@@ -1656,10 +1620,8 @@ static void do_v7m_exception_exit(ARMCPU *cpu)
* use 'frame_sp_p' after we do something that makes it invalid.
*/
bool spsel = env->v7m.control[return_to_secure] & R_V7M_CONTROL_SPSEL_MASK;
- uint32_t *frame_sp_p = get_v7m_sp_ptr(env,
- return_to_secure,
- !return_to_handler,
- spsel);
+ uint32_t *frame_sp_p = arm_v7m_get_sp_ptr(env, return_to_secure,
+ !return_to_handler, spsel);
uint32_t frameptr = *frame_sp_p;
bool pop_ok = true;
ARMMMUIdx mmu_idx;
@@ -1965,7 +1927,7 @@ static bool do_v7m_function_return(ARMCPU *cpu)
threadmode = !arm_v7m_is_handler_mode(env);
spsel = env->v7m.control[M_REG_S] & R_V7M_CONTROL_SPSEL_MASK;
- frame_sp_p = get_v7m_sp_ptr(env, true, threadmode, spsel);
+ frame_sp_p = arm_v7m_get_sp_ptr(env, true, threadmode, spsel);
frameptr = *frame_sp_p;
/*
@@ -2900,3 +2862,39 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op)
}
#endif /* !CONFIG_USER_ONLY */
+
+uint32_t *arm_v7m_get_sp_ptr(CPUARMState *env, bool secure, bool threadmode,
+ bool spsel)
+{
+ /*
+ * Return a pointer to the location where we currently store the
+ * stack pointer for the requested security state and thread mode.
+ * This pointer will become invalid if the CPU state is updated
+ * such that the stack pointers are switched around (eg changing
+ * the SPSEL control bit).
+ * Compare the v8M ARM ARM pseudocode LookUpSP_with_security_mode().
+ * Unlike that pseudocode, we require the caller to pass us in the
+ * SPSEL control bit value; this is because we also use this
+ * function in handling of pushing of the callee-saves registers
+ * part of the v8M stack frame (pseudocode PushCalleeStack()),
+ * and in the tailchain codepath the SPSEL bit comes from the exception
+ * return magic LR value from the previous exception. The pseudocode
+ * opencodes the stack-selection in PushCalleeStack(), but we prefer
+ * to make this utility function generic enough to do the job.
+ */
+ bool want_psp = threadmode && spsel;
+
+ if (secure == env->v7m.secure) {
+ if (want_psp == v7m_using_psp(env)) {
+ return &env->regs[13];
+ } else {
+ return &env->v7m.other_sp;
+ }
+ } else {
+ if (want_psp) {
+ return &env->v7m.other_ss_psp;
+ } else {
+ return &env->v7m.other_ss_msp;
+ }
+ }
+}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 14/21] target/arm: Implement gdbstub m-profile systemreg and secext
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (12 preceding siblings ...)
2023-03-06 15:34 ` [PULL 13/21] target/arm: Export arm_v7m_get_sp_ptr Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 15/21] target/arm: Handle m-profile in arm_is_secure Peter Maydell
` (7 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
The upstream gdb xml only implements {MSP,PSP}{,_NS,S}, but
go ahead and implement the other system registers as well.
Since there is significant overlap between the two, implement
them with common code. The only exception is the systemreg
view of CONTROL, which merges the banked bits as per MRS.
Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-15-richard.henderson@linaro.org
[rth: Substatial rewrite using enumerator and shared code.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 2 +
target/arm/gdbstub.c | 178 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 180 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 379e74d1f99..c4bd22808ce 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -869,6 +869,8 @@ struct ArchCPU {
DynamicGDBXMLInfo dyn_sysreg_xml;
DynamicGDBXMLInfo dyn_svereg_xml;
+ DynamicGDBXMLInfo dyn_m_systemreg_xml;
+ DynamicGDBXMLInfo dyn_m_secextreg_xml;
/* Timers used by the generic (architected) timer */
QEMUTimer *gt_timer[NUM_GTIMERS];
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 062c8d447a0..3f799f5d058 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -322,6 +322,164 @@ static int arm_gen_dynamic_sysreg_xml(CPUState *cs, int base_reg)
return cpu->dyn_sysreg_xml.num;
}
+typedef enum {
+ M_SYSREG_MSP,
+ M_SYSREG_PSP,
+ M_SYSREG_PRIMASK,
+ M_SYSREG_CONTROL,
+ M_SYSREG_BASEPRI,
+ M_SYSREG_FAULTMASK,
+ M_SYSREG_MSPLIM,
+ M_SYSREG_PSPLIM,
+} MProfileSysreg;
+
+static const struct {
+ const char *name;
+ int feature;
+} m_sysreg_def[] = {
+ [M_SYSREG_MSP] = { "msp", ARM_FEATURE_M },
+ [M_SYSREG_PSP] = { "psp", ARM_FEATURE_M },
+ [M_SYSREG_PRIMASK] = { "primask", ARM_FEATURE_M },
+ [M_SYSREG_CONTROL] = { "control", ARM_FEATURE_M },
+ [M_SYSREG_BASEPRI] = { "basepri", ARM_FEATURE_M_MAIN },
+ [M_SYSREG_FAULTMASK] = { "faultmask", ARM_FEATURE_M_MAIN },
+ [M_SYSREG_MSPLIM] = { "msplim", ARM_FEATURE_V8 },
+ [M_SYSREG_PSPLIM] = { "psplim", ARM_FEATURE_V8 },
+};
+
+static uint32_t *m_sysreg_ptr(CPUARMState *env, MProfileSysreg reg, bool sec)
+{
+ uint32_t *ptr;
+
+ switch (reg) {
+ case M_SYSREG_MSP:
+ ptr = arm_v7m_get_sp_ptr(env, sec, false, true);
+ break;
+ case M_SYSREG_PSP:
+ ptr = arm_v7m_get_sp_ptr(env, sec, true, true);
+ break;
+ case M_SYSREG_MSPLIM:
+ ptr = &env->v7m.msplim[sec];
+ break;
+ case M_SYSREG_PSPLIM:
+ ptr = &env->v7m.psplim[sec];
+ break;
+ case M_SYSREG_PRIMASK:
+ ptr = &env->v7m.primask[sec];
+ break;
+ case M_SYSREG_BASEPRI:
+ ptr = &env->v7m.basepri[sec];
+ break;
+ case M_SYSREG_FAULTMASK:
+ ptr = &env->v7m.faultmask[sec];
+ break;
+ case M_SYSREG_CONTROL:
+ ptr = &env->v7m.control[sec];
+ break;
+ default:
+ return NULL;
+ }
+ return arm_feature(env, m_sysreg_def[reg].feature) ? ptr : NULL;
+}
+
+static int m_sysreg_get(CPUARMState *env, GByteArray *buf,
+ MProfileSysreg reg, bool secure)
+{
+ uint32_t *ptr = m_sysreg_ptr(env, reg, secure);
+
+ if (ptr == NULL) {
+ return 0;
+ }
+ return gdb_get_reg32(buf, *ptr);
+}
+
+static int arm_gdb_get_m_systemreg(CPUARMState *env, GByteArray *buf, int reg)
+{
+ /*
+ * Here, we emulate MRS instruction, where CONTROL has a mix of
+ * banked and non-banked bits.
+ */
+ if (reg == M_SYSREG_CONTROL) {
+ return gdb_get_reg32(buf, arm_v7m_mrs_control(env, env->v7m.secure));
+ }
+ return m_sysreg_get(env, buf, reg, env->v7m.secure);
+}
+
+static int arm_gdb_set_m_systemreg(CPUARMState *env, uint8_t *buf, int reg)
+{
+ return 0; /* TODO */
+}
+
+static int arm_gen_dynamic_m_systemreg_xml(CPUState *cs, int orig_base_reg)
+{
+ ARMCPU *cpu = ARM_CPU(cs);
+ CPUARMState *env = &cpu->env;
+ GString *s = g_string_new(NULL);
+ int base_reg = orig_base_reg;
+ int i;
+
+ g_string_printf(s, "<?xml version=\"1.0\"?>");
+ g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
+ g_string_append_printf(s, "<feature name=\"org.gnu.gdb.arm.m-system\">\n");
+
+ for (i = 0; i < ARRAY_SIZE(m_sysreg_def); i++) {
+ if (arm_feature(env, m_sysreg_def[i].feature)) {
+ g_string_append_printf(s,
+ "<reg name=\"%s\" bitsize=\"32\" regnum=\"%d\"/>\n",
+ m_sysreg_def[i].name, base_reg++);
+ }
+ }
+
+ g_string_append_printf(s, "</feature>");
+ cpu->dyn_m_systemreg_xml.desc = g_string_free(s, false);
+ cpu->dyn_m_systemreg_xml.num = base_reg - orig_base_reg;
+
+ return cpu->dyn_m_systemreg_xml.num;
+}
+
+#ifndef CONFIG_USER_ONLY
+/*
+ * For user-only, we see the non-secure registers via m_systemreg above.
+ * For secext, encode the non-secure view as even and secure view as odd.
+ */
+static int arm_gdb_get_m_secextreg(CPUARMState *env, GByteArray *buf, int reg)
+{
+ return m_sysreg_get(env, buf, reg >> 1, reg & 1);
+}
+
+static int arm_gdb_set_m_secextreg(CPUARMState *env, uint8_t *buf, int reg)
+{
+ return 0; /* TODO */
+}
+
+static int arm_gen_dynamic_m_secextreg_xml(CPUState *cs, int orig_base_reg)
+{
+ ARMCPU *cpu = ARM_CPU(cs);
+ GString *s = g_string_new(NULL);
+ int base_reg = orig_base_reg;
+ int i;
+
+ g_string_printf(s, "<?xml version=\"1.0\"?>");
+ g_string_append_printf(s, "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
+ g_string_append_printf(s, "<feature name=\"org.gnu.gdb.arm.secext\">\n");
+
+ for (i = 0; i < ARRAY_SIZE(m_sysreg_def); i++) {
+ g_string_append_printf(s,
+ "<reg name=\"%s_ns\" bitsize=\"32\" regnum=\"%d\"/>\n",
+ m_sysreg_def[i].name, base_reg++);
+ g_string_append_printf(s,
+ "<reg name=\"%s_s\" bitsize=\"32\" regnum=\"%d\"/>\n",
+ m_sysreg_def[i].name, base_reg++);
+ }
+
+ g_string_append_printf(s, "</feature>");
+ cpu->dyn_m_secextreg_xml.desc = g_string_free(s, false);
+ cpu->dyn_m_secextreg_xml.num = base_reg - orig_base_reg;
+
+ return cpu->dyn_m_secextreg_xml.num;
+}
+#endif
+
const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
{
ARMCPU *cpu = ARM_CPU(cs);
@@ -330,6 +488,12 @@ const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname)
return cpu->dyn_sysreg_xml.desc;
} else if (strcmp(xmlname, "sve-registers.xml") == 0) {
return cpu->dyn_svereg_xml.desc;
+ } else if (strcmp(xmlname, "arm-m-system.xml") == 0) {
+ return cpu->dyn_m_systemreg_xml.desc;
+#ifndef CONFIG_USER_ONLY
+ } else if (strcmp(xmlname, "arm-m-secext.xml") == 0) {
+ return cpu->dyn_m_secextreg_xml.desc;
+#endif
}
return NULL;
}
@@ -389,4 +553,18 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs),
"system-registers.xml", 0);
+ if (arm_feature(env, ARM_FEATURE_M)) {
+ gdb_register_coprocessor(cs,
+ arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg,
+ arm_gen_dynamic_m_systemreg_xml(cs, cs->gdb_num_regs),
+ "arm-m-system.xml", 0);
+#ifndef CONFIG_USER_ONLY
+ if (arm_feature(env, ARM_FEATURE_M_SECURITY)) {
+ gdb_register_coprocessor(cs,
+ arm_gdb_get_m_secextreg, arm_gdb_set_m_secextreg,
+ arm_gen_dynamic_m_secextreg_xml(cs, cs->gdb_num_regs),
+ "arm-m-secext.xml", 0);
+ }
+#endif
+ }
}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 15/21] target/arm: Handle m-profile in arm_is_secure
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (13 preceding siblings ...)
2023-03-06 15:34 ` [PULL 14/21] target/arm: Implement gdbstub m-profile systemreg and secext Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 16/21] target/arm: Stub arm_hcr_el2_eff for m-profile Peter Maydell
` (6 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1421
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227225832.816605-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index c4bd22808ce..ab187012770 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2421,6 +2421,9 @@ static inline bool arm_is_el3_or_mon(CPUARMState *env)
/* Return true if the processor is in secure state */
static inline bool arm_is_secure(CPUARMState *env)
{
+ if (arm_feature(env, ARM_FEATURE_M)) {
+ return env->v7m.secure;
+ }
if (arm_is_el3_or_mon(env)) {
return true;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 16/21] target/arm: Stub arm_hcr_el2_eff for m-profile
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (14 preceding siblings ...)
2023-03-06 15:34 ` [PULL 15/21] target/arm: Handle m-profile in arm_is_secure Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 17/21] target/arm: Diagnose incorrect usage of arm_is_secure subroutines Peter Maydell
` (5 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
M-profile doesn't have HCR_EL2. While we could test features
before each call, zero is a generally safe return value to
disable the code in the caller. This test is required to
avoid an assert in arm_is_secure_below_el3.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227225832.816605-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 82c546f11a9..2297626bfb3 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -5787,6 +5787,9 @@ uint64_t arm_hcr_el2_eff_secstate(CPUARMState *env, bool secure)
uint64_t arm_hcr_el2_eff(CPUARMState *env)
{
+ if (arm_feature(env, ARM_FEATURE_M)) {
+ return 0;
+ }
return arm_hcr_el2_eff_secstate(env, arm_is_secure_below_el3(env));
}
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 17/21] target/arm: Diagnose incorrect usage of arm_is_secure subroutines
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (15 preceding siblings ...)
2023-03-06 15:34 ` [PULL 16/21] target/arm: Stub arm_hcr_el2_eff for m-profile Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 18/21] target/arm: Rewrite check_s2_mmu_setup Peter Maydell
` (4 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
In several places we use arm_is_secure_below_el3 and
arm_is_el3_or_mon separately from arm_is_secure.
These functions make no sense for m-profile, and
would indicate prior incorrect feature testing.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227225832.816605-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index ab187012770..c097cae9882 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2384,7 +2384,8 @@ static inline int arm_feature(CPUARMState *env, int feature)
void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp);
#if !defined(CONFIG_USER_ONLY)
-/* Return true if exception levels below EL3 are in secure state,
+/*
+ * Return true if exception levels below EL3 are in secure state,
* or would be following an exception return to that level.
* Unlike arm_is_secure() (which is always a question about the
* _current_ state of the CPU) this doesn't care about the current
@@ -2392,6 +2393,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp);
*/
static inline bool arm_is_secure_below_el3(CPUARMState *env)
{
+ assert(!arm_feature(env, ARM_FEATURE_M));
if (arm_feature(env, ARM_FEATURE_EL3)) {
return !(env->cp15.scr_el3 & SCR_NS);
} else {
@@ -2405,6 +2407,7 @@ static inline bool arm_is_secure_below_el3(CPUARMState *env)
/* Return true if the CPU is AArch64 EL3 or AArch32 Mon */
static inline bool arm_is_el3_or_mon(CPUARMState *env)
{
+ assert(!arm_feature(env, ARM_FEATURE_M));
if (arm_feature(env, ARM_FEATURE_EL3)) {
if (is_a64(env) && extract32(env->pstate, 2, 2) == 3) {
/* CPU currently in AArch64 state and EL3 */
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 18/21] target/arm: Rewrite check_s2_mmu_setup
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (16 preceding siblings ...)
2023-03-06 15:34 ` [PULL 17/21] target/arm: Diagnose incorrect usage of arm_is_secure subroutines Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 19/21] hw: arm: Support direct boot for Linux/arm64 EFI zboot images Peter Maydell
` (3 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Richard Henderson <richard.henderson@linaro.org>
Integrate neighboring code from get_phys_addr_lpae which computed
starting level, as it is easier to validate when doing both at the
same time. Mirror the checks at the start of AArch{64,32}.S2Walk,
especially S2InvalidSL and S2InconsistentSL.
This reverts 49ba115bb74, which was incorrect -- there is nothing
in the ARM pseudocode that depends on TxSZ, i.e. outputsize; the
pseudocode is consistent in referencing PAMax.
Fixes: 49ba115bb74 ("target/arm: Pass outputsize down to check_s2_mmu_setup")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227225832.816605-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/ptw.c | 173 ++++++++++++++++++++++++++---------------------
1 file changed, 97 insertions(+), 76 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 8541ef56d61..ec3f51782aa 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1081,70 +1081,119 @@ static ARMVAParameters aa32_va_parameters(CPUARMState *env, uint32_t va,
* check_s2_mmu_setup
* @cpu: ARMCPU
* @is_aa64: True if the translation regime is in AArch64 state
- * @startlevel: Suggested starting level
- * @inputsize: Bitsize of IPAs
+ * @tcr: VTCR_EL2 or VSTCR_EL2
+ * @ds: Effective value of TCR.DS.
+ * @iasize: Bitsize of IPAs
* @stride: Page-table stride (See the ARM ARM)
*
- * Returns true if the suggested S2 translation parameters are OK and
- * false otherwise.
+ * Decode the starting level of the S2 lookup, returning INT_MIN if
+ * the configuration is invalid.
*/
-static bool check_s2_mmu_setup(ARMCPU *cpu, bool is_aa64, int level,
- int inputsize, int stride, int outputsize)
+static int check_s2_mmu_setup(ARMCPU *cpu, bool is_aa64, uint64_t tcr,
+ bool ds, int iasize, int stride)
{
- const int grainsize = stride + 3;
- int startsizecheck;
-
- /*
- * Negative levels are usually not allowed...
- * Except for FEAT_LPA2, 4k page table, 52-bit address space, which
- * begins with level -1. Note that previous feature tests will have
- * eliminated this combination if it is not enabled.
- */
- if (level < (inputsize == 52 && stride == 9 ? -1 : 0)) {
- return false;
- }
-
- startsizecheck = inputsize - ((3 - level) * stride + grainsize);
- if (startsizecheck < 1 || startsizecheck > stride + 4) {
- return false;
- }
+ int sl0, sl2, startlevel, granulebits, levels;
+ int s1_min_iasize, s1_max_iasize;
+ sl0 = extract32(tcr, 6, 2);
if (is_aa64) {
+ /*
+ * AArch64.S2InvalidTxSZ: While we checked tsz_oob near the top of
+ * get_phys_addr_lpae, that used aa64_va_parameters which apply
+ * to aarch64. If Stage1 is aarch32, the min_txsz is larger.
+ * See AArch64.S2MinTxSZ, where min_tsz is 24, translated to
+ * inputsize is 64 - 24 = 40.
+ */
+ if (iasize < 40 && !arm_el_is_aa64(&cpu->env, 1)) {
+ goto fail;
+ }
+
+ /*
+ * AArch64.S2InvalidSL: Interpretation of SL depends on the page size,
+ * so interleave AArch64.S2StartLevel.
+ */
switch (stride) {
- case 13: /* 64KB Pages. */
- if (level == 0 || (level == 1 && outputsize <= 42)) {
- return false;
+ case 9: /* 4KB */
+ /* SL2 is RES0 unless DS=1 & 4KB granule. */
+ sl2 = extract64(tcr, 33, 1);
+ if (ds && sl2) {
+ if (sl0 != 0) {
+ goto fail;
+ }
+ startlevel = -1;
+ } else {
+ startlevel = 2 - sl0;
+ switch (sl0) {
+ case 2:
+ if (arm_pamax(cpu) < 44) {
+ goto fail;
+ }
+ break;
+ case 3:
+ if (!cpu_isar_feature(aa64_st, cpu)) {
+ goto fail;
+ }
+ startlevel = 3;
+ break;
+ }
}
break;
- case 11: /* 16KB Pages. */
- if (level == 0 || (level == 1 && outputsize <= 40)) {
- return false;
+ case 11: /* 16KB */
+ switch (sl0) {
+ case 2:
+ if (arm_pamax(cpu) < 42) {
+ goto fail;
+ }
+ break;
+ case 3:
+ if (!ds) {
+ goto fail;
+ }
+ break;
}
+ startlevel = 3 - sl0;
break;
- case 9: /* 4KB Pages. */
- if (level == 0 && outputsize <= 42) {
- return false;
+ case 13: /* 64KB */
+ switch (sl0) {
+ case 2:
+ if (arm_pamax(cpu) < 44) {
+ goto fail;
+ }
+ break;
+ case 3:
+ goto fail;
}
+ startlevel = 3 - sl0;
break;
default:
g_assert_not_reached();
}
-
- /* Inputsize checks. */
- if (inputsize > outputsize &&
- (arm_el_is_aa64(&cpu->env, 1) || inputsize > 40)) {
- /* This is CONSTRAINED UNPREDICTABLE and we choose to fault. */
- return false;
- }
} else {
- /* AArch32 only supports 4KB pages. Assert on that. */
+ /*
+ * Things are simpler for AArch32 EL2, with only 4k pages.
+ * There is no separate S2InvalidSL function, but AArch32.S2Walk
+ * begins with walkparms.sl0 in {'1x'}.
+ */
assert(stride == 9);
-
- if (level == 0) {
- return false;
+ if (sl0 >= 2) {
+ goto fail;
}
+ startlevel = 2 - sl0;
}
- return true;
+
+ /* AArch{64,32}.S2InconsistentSL are functionally equivalent. */
+ levels = 3 - startlevel;
+ granulebits = stride + 3;
+
+ s1_min_iasize = levels * stride + granulebits + 1;
+ s1_max_iasize = s1_min_iasize + (stride - 1) + 4;
+
+ if (iasize >= s1_min_iasize && iasize <= s1_max_iasize) {
+ return startlevel;
+ }
+
+ fail:
+ return INT_MIN;
}
/**
@@ -1300,38 +1349,10 @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw,
*/
level = 4 - (inputsize - 4) / stride;
} else {
- /*
- * For stage 2 translations the starting level is specified by the
- * VTCR_EL2.SL0 field (whose interpretation depends on the page size)
- */
- uint32_t sl0 = extract32(tcr, 6, 2);
- uint32_t sl2 = extract64(tcr, 33, 1);
- int32_t startlevel;
- bool ok;
-
- /* SL2 is RES0 unless DS=1 & 4kb granule. */
- if (param.ds && stride == 9 && sl2) {
- if (sl0 != 0) {
- level = 0;
- goto do_translation_fault;
- }
- startlevel = -1;
- } else if (!aarch64 || stride == 9) {
- /* AArch32 or 4KB pages */
- startlevel = 2 - sl0;
-
- if (cpu_isar_feature(aa64_st, cpu)) {
- startlevel &= 3;
- }
- } else {
- /* 16KB or 64KB pages */
- startlevel = 3 - sl0;
- }
-
- /* Check that the starting level is valid. */
- ok = check_s2_mmu_setup(cpu, aarch64, startlevel,
- inputsize, stride, outputsize);
- if (!ok) {
+ int startlevel = check_s2_mmu_setup(cpu, aarch64, tcr, param.ds,
+ inputsize, stride);
+ if (startlevel == INT_MIN) {
+ level = 0;
goto do_translation_fault;
}
level = startlevel;
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 19/21] hw: arm: Support direct boot for Linux/arm64 EFI zboot images
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (17 preceding siblings ...)
2023-03-06 15:34 ` [PULL 18/21] target/arm: Rewrite check_s2_mmu_setup Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 20/21] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs Peter Maydell
` (2 subsequent siblings)
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: Ard Biesheuvel <ardb@kernel.org>
Fedora 39 will ship its arm64 kernels in the new generic EFI zboot
format, using gzip compression for the payload.
For doing EFI boot in QEMU, this is completely transparent, as the
firmware or bootloader will take care of this. However, for direct
kernel boot without firmware, we will lose the ability to boot such
distro kernels unless we deal with the new format directly.
EFI zboot images contain metadata in the header regarding the placement
of the compressed payload inside the image, and the type of compression
used. This means we can wire up the existing gzip support without too
much hassle, by parsing the header and grabbing the payload from inside
the loaded zboot image.
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Message-id: 20230303160109.3626966-1-ardb@kernel.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: tweaked comment formatting, fixed checkpatch nits]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/loader.h | 19 ++++++++++
hw/arm/boot.c | 6 +++
hw/core/loader.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 116 insertions(+)
diff --git a/include/hw/loader.h b/include/hw/loader.h
index 1384796a4b3..c4c14170ea3 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -86,6 +86,25 @@ ssize_t load_image_gzipped_buffer(const char *filename, uint64_t max_sz,
uint8_t **buffer);
ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz);
+/**
+ * unpack_efi_zboot_image:
+ * @buffer: pointer to a variable holding the address of a buffer containing the
+ * image
+ * @size: pointer to a variable holding the size of the buffer
+ *
+ * Check whether the buffer contains a EFI zboot image, and if it does, extract
+ * the compressed payload and decompress it into a new buffer. If successful,
+ * the old buffer is freed, and the *buffer and size variables pointed to by the
+ * function arguments are updated to refer to the newly populated buffer.
+ *
+ * Returns 0 if the image could not be identified as a EFI zboot image.
+ * Returns -1 if the buffer contents were identified as a EFI zboot image, but
+ * unpacking failed for any reason.
+ * Returns the size of the decompressed payload if decompression was performed
+ * successfully.
+ */
+ssize_t unpack_efi_zboot_image(uint8_t **buffer, int *size);
+
#define ELF_LOAD_FAILED -1
#define ELF_LOAD_NOT_ELF -2
#define ELF_LOAD_WRONG_ARCH -3
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 1e021c4a340..50e5141116b 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -926,6 +926,12 @@ static uint64_t load_aarch64_image(const char *filename, hwaddr mem_base,
return -1;
}
size = len;
+
+ /* Unpack the image if it is a EFI zboot image */
+ if (unpack_efi_zboot_image(&buffer, &size) < 0) {
+ g_free(buffer);
+ return -1;
+ }
}
/* check the arm64 magic header value -- very old kernels may not have it */
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 173f8f67f6e..cd53235fed9 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -857,6 +857,97 @@ ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)
return bytes;
}
+/* The PE/COFF MS-DOS stub magic number */
+#define EFI_PE_MSDOS_MAGIC "MZ"
+
+/*
+ * The Linux header magic number for a EFI PE/COFF
+ * image targetting an unspecified architecture.
+ */
+#define EFI_PE_LINUX_MAGIC "\xcd\x23\x82\x81"
+
+/*
+ * Bootable Linux kernel images may be packaged as EFI zboot images, which are
+ * self-decompressing executables when loaded via EFI. The compressed payload
+ * can also be extracted from the image and decompressed by a non-EFI loader.
+ *
+ * The de facto specification for this format is at the following URL:
+ *
+ * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/zboot-header.S
+ *
+ * This definition is based on Linux upstream commit 29636a5ce87beba.
+ */
+struct linux_efi_zboot_header {
+ uint8_t msdos_magic[2]; /* PE/COFF 'MZ' magic number */
+ uint8_t reserved0[2];
+ uint8_t zimg[4]; /* "zimg" for Linux EFI zboot images */
+ uint32_t payload_offset; /* LE offset to compressed payload */
+ uint32_t payload_size; /* LE size of the compressed payload */
+ uint8_t reserved1[8];
+ char compression_type[32]; /* Compression type, NUL terminated */
+ uint8_t linux_magic[4]; /* Linux header magic */
+ uint32_t pe_header_offset; /* LE offset to the PE header */
+};
+
+/*
+ * Check whether *buffer points to a Linux EFI zboot image in memory.
+ *
+ * If it does, attempt to decompress it to a new buffer, and free the old one.
+ * If any of this fails, return an error to the caller.
+ *
+ * If the image is not a Linux EFI zboot image, do nothing and return success.
+ */
+ssize_t unpack_efi_zboot_image(uint8_t **buffer, int *size)
+{
+ const struct linux_efi_zboot_header *header;
+ uint8_t *data = NULL;
+ int ploff, plsize;
+ ssize_t bytes;
+
+ /* ignore if this is too small to be a EFI zboot image */
+ if (*size < sizeof(*header)) {
+ return 0;
+ }
+
+ header = (struct linux_efi_zboot_header *)*buffer;
+
+ /* ignore if this is not a Linux EFI zboot image */
+ if (memcmp(&header->msdos_magic, EFI_PE_MSDOS_MAGIC, 2) != 0 ||
+ memcmp(&header->zimg, "zimg", 4) != 0 ||
+ memcmp(&header->linux_magic, EFI_PE_LINUX_MAGIC, 4) != 0) {
+ return 0;
+ }
+
+ if (strcmp(header->compression_type, "gzip") != 0) {
+ fprintf(stderr,
+ "unable to handle EFI zboot image with \"%.*s\" compression\n",
+ (int)sizeof(header->compression_type) - 1,
+ header->compression_type);
+ return -1;
+ }
+
+ ploff = ldl_le_p(&header->payload_offset);
+ plsize = ldl_le_p(&header->payload_size);
+
+ if (ploff < 0 || plsize < 0 || ploff + plsize > *size) {
+ fprintf(stderr, "unable to handle corrupt EFI zboot image\n");
+ return -1;
+ }
+
+ data = g_malloc(LOAD_IMAGE_MAX_GUNZIP_BYTES);
+ bytes = gunzip(data, LOAD_IMAGE_MAX_GUNZIP_BYTES, *buffer + ploff, plsize);
+ if (bytes < 0) {
+ fprintf(stderr, "failed to decompress EFI zboot image\n");
+ g_free(data);
+ return -1;
+ }
+
+ g_free(*buffer);
+ *buffer = g_realloc(data, bytes);
+ *size = bytes;
+ return bytes;
+}
+
/*
* Functions for reboot-persistent memory regions.
* - used for vga bios and option roms.
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 20/21] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (18 preceding siblings ...)
2023-03-06 15:34 ` [PULL 19/21] hw: arm: Support direct boot for Linux/arm64 EFI zboot images Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-06 15:34 ` [PULL 21/21] hw: arm: allwinner-h3: Fix and complete H3 i2c devices Peter Maydell
2023-03-07 12:42 ` [PULL 00/21] target-arm queue Peter Maydell
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: qianfan Zhao <qianfanguijin@163.com>
TWI_CNTR_INT_FLAG is W1C(write 1 to clear and write 0 has non-effect)
register on SUN6i based SoCs, we should lower interrupt when the guest
set this bit.
The linux kernel will hang in irq handler(mv64xxx_i2c_intr) if no
device connected on the i2c bus, next is the trace log:
allwinner_i2c_write write CNTR(0x0c): 0xc4 A_ACK BUS_EN INT_EN
allwinner_i2c_write write CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
allwinner_i2c_read read CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
allwinner_i2c_read read STAT(0x10): 0x20 STAT_M_ADDR_WR_NACK
allwinner_i2c_write write CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
allwinner_i2c_write write CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read STAT(0x10): 0xf8 STAT_IDLE
allwinner_i2c_write write CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
allwinner_i2c_write write CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read STAT(0x10): 0xf8 STAT_IDLE
...
Fix it.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Reviewed-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Tested-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/i2c/allwinner-i2c.h | 6 ++++++
hw/i2c/allwinner-i2c.c | 26 ++++++++++++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/include/hw/i2c/allwinner-i2c.h b/include/hw/i2c/allwinner-i2c.h
index 4f378b86ba1..0e325d265ee 100644
--- a/include/hw/i2c/allwinner-i2c.h
+++ b/include/hw/i2c/allwinner-i2c.h
@@ -28,6 +28,10 @@
#include "qom/object.h"
#define TYPE_AW_I2C "allwinner.i2c"
+
+/** Allwinner I2C sun6i family and newer (A31, H2+, H3, etc) */
+#define TYPE_AW_I2C_SUN6I TYPE_AW_I2C "-sun6i"
+
OBJECT_DECLARE_SIMPLE_TYPE(AWI2CState, AW_I2C)
#define AW_I2C_MEM_SIZE 0x24
@@ -50,6 +54,8 @@ struct AWI2CState {
uint8_t srst;
uint8_t efr;
uint8_t lcr;
+
+ bool irq_clear_inverted;
};
#endif /* ALLWINNER_I2C_H */
diff --git a/hw/i2c/allwinner-i2c.c b/hw/i2c/allwinner-i2c.c
index a4359658362..f24c3ac6f0c 100644
--- a/hw/i2c/allwinner-i2c.c
+++ b/hw/i2c/allwinner-i2c.c
@@ -357,10 +357,16 @@ static void allwinner_i2c_write(void *opaque, hwaddr offset,
s->stat = STAT_FROM_STA(STAT_IDLE);
s->cntr &= ~TWI_CNTR_M_STP;
}
- if ((s->cntr & TWI_CNTR_INT_FLAG) == 0) {
- /* Interrupt flag cleared */
+
+ if (!s->irq_clear_inverted && !(s->cntr & TWI_CNTR_INT_FLAG)) {
+ /* Write 0 to clear this flag */
+ qemu_irq_lower(s->irq);
+ } else if (s->irq_clear_inverted && (s->cntr & TWI_CNTR_INT_FLAG)) {
+ /* Write 1 to clear this flag */
+ s->cntr &= ~TWI_CNTR_INT_FLAG;
qemu_irq_lower(s->irq);
}
+
if ((s->cntr & TWI_CNTR_A_ACK) == 0) {
if (STAT_TO_STA(s->stat) == STAT_M_DATA_RX_ACK) {
s->stat = STAT_FROM_STA(STAT_M_DATA_RX_NACK);
@@ -451,9 +457,25 @@ static const TypeInfo allwinner_i2c_type_info = {
.class_init = allwinner_i2c_class_init,
};
+static void allwinner_i2c_sun6i_init(Object *obj)
+{
+ AWI2CState *s = AW_I2C(obj);
+
+ s->irq_clear_inverted = true;
+}
+
+static const TypeInfo allwinner_i2c_sun6i_type_info = {
+ .name = TYPE_AW_I2C_SUN6I,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(AWI2CState),
+ .instance_init = allwinner_i2c_sun6i_init,
+ .class_init = allwinner_i2c_class_init,
+};
+
static void allwinner_i2c_register_types(void)
{
type_register_static(&allwinner_i2c_type_info);
+ type_register_static(&allwinner_i2c_sun6i_type_info);
}
type_init(allwinner_i2c_register_types)
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [PULL 21/21] hw: arm: allwinner-h3: Fix and complete H3 i2c devices
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (19 preceding siblings ...)
2023-03-06 15:34 ` [PULL 20/21] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs Peter Maydell
@ 2023-03-06 15:34 ` Peter Maydell
2023-03-07 12:42 ` [PULL 00/21] target-arm queue Peter Maydell
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-06 15:34 UTC (permalink / raw)
To: qemu-devel
From: qianfan Zhao <qianfanguijin@163.com>
Allwinner h3 has 4 twi(i2c) devices named twi0, twi1, twi2 and r_twi.
The registers are compatible with TYPE_AW_I2C_SUN6I, write 1 to clear
control register's INT_FLAG bit.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Reviewed-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/arm/allwinner-h3.h | 6 ++++++
hw/arm/allwinner-h3.c | 29 +++++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/include/hw/arm/allwinner-h3.h b/include/hw/arm/allwinner-h3.h
index 1d7ce205890..59e0f822d2d 100644
--- a/include/hw/arm/allwinner-h3.h
+++ b/include/hw/arm/allwinner-h3.h
@@ -84,6 +84,8 @@ enum {
AW_H3_DEV_UART3,
AW_H3_DEV_EMAC,
AW_H3_DEV_TWI0,
+ AW_H3_DEV_TWI1,
+ AW_H3_DEV_TWI2,
AW_H3_DEV_DRAMCOM,
AW_H3_DEV_DRAMCTL,
AW_H3_DEV_DRAMPHY,
@@ -93,6 +95,7 @@ enum {
AW_H3_DEV_GIC_VCPU,
AW_H3_DEV_RTC,
AW_H3_DEV_CPUCFG,
+ AW_H3_DEV_R_TWI,
AW_H3_DEV_SDRAM
};
@@ -133,6 +136,9 @@ struct AwH3State {
AwSidState sid;
AwSdHostState mmc0;
AWI2CState i2c0;
+ AWI2CState i2c1;
+ AWI2CState i2c2;
+ AWI2CState r_twi;
AwSun8iEmacState emac;
AwRtcState rtc;
GICState gic;
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index bfce3c8d92a..69d0ad6f50e 100644
--- a/hw/arm/allwinner-h3.c
+++ b/hw/arm/allwinner-h3.c
@@ -54,6 +54,8 @@ const hwaddr allwinner_h3_memmap[] = {
[AW_H3_DEV_UART2] = 0x01c28800,
[AW_H3_DEV_UART3] = 0x01c28c00,
[AW_H3_DEV_TWI0] = 0x01c2ac00,
+ [AW_H3_DEV_TWI1] = 0x01c2b000,
+ [AW_H3_DEV_TWI2] = 0x01c2b400,
[AW_H3_DEV_EMAC] = 0x01c30000,
[AW_H3_DEV_DRAMCOM] = 0x01c62000,
[AW_H3_DEV_DRAMCTL] = 0x01c63000,
@@ -64,6 +66,7 @@ const hwaddr allwinner_h3_memmap[] = {
[AW_H3_DEV_GIC_VCPU] = 0x01c86000,
[AW_H3_DEV_RTC] = 0x01f00000,
[AW_H3_DEV_CPUCFG] = 0x01f01c00,
+ [AW_H3_DEV_R_TWI] = 0x01f02400,
[AW_H3_DEV_SDRAM] = 0x40000000
};
@@ -107,8 +110,6 @@ struct AwH3Unimplemented {
{ "uart1", 0x01c28400, 1 * KiB },
{ "uart2", 0x01c28800, 1 * KiB },
{ "uart3", 0x01c28c00, 1 * KiB },
- { "twi1", 0x01c2b000, 1 * KiB },
- { "twi2", 0x01c2b400, 1 * KiB },
{ "scr", 0x01c2c400, 1 * KiB },
{ "gpu", 0x01c40000, 64 * KiB },
{ "hstmr", 0x01c60000, 4 * KiB },
@@ -123,7 +124,6 @@ struct AwH3Unimplemented {
{ "r_prcm", 0x01f01400, 1 * KiB },
{ "r_twd", 0x01f01800, 1 * KiB },
{ "r_cir-rx", 0x01f02000, 1 * KiB },
- { "r_twi", 0x01f02400, 1 * KiB },
{ "r_uart", 0x01f02800, 1 * KiB },
{ "r_pio", 0x01f02c00, 1 * KiB },
{ "r_pwm", 0x01f03800, 1 * KiB },
@@ -151,8 +151,11 @@ enum {
AW_H3_GIC_SPI_UART2 = 2,
AW_H3_GIC_SPI_UART3 = 3,
AW_H3_GIC_SPI_TWI0 = 6,
+ AW_H3_GIC_SPI_TWI1 = 7,
+ AW_H3_GIC_SPI_TWI2 = 8,
AW_H3_GIC_SPI_TIMER0 = 18,
AW_H3_GIC_SPI_TIMER1 = 19,
+ AW_H3_GIC_SPI_R_TWI = 44,
AW_H3_GIC_SPI_MMC0 = 60,
AW_H3_GIC_SPI_EHCI0 = 72,
AW_H3_GIC_SPI_OHCI0 = 73,
@@ -227,7 +230,10 @@ static void allwinner_h3_init(Object *obj)
object_initialize_child(obj, "rtc", &s->rtc, TYPE_AW_RTC_SUN6I);
- object_initialize_child(obj, "twi0", &s->i2c0, TYPE_AW_I2C);
+ object_initialize_child(obj, "twi0", &s->i2c0, TYPE_AW_I2C_SUN6I);
+ object_initialize_child(obj, "twi1", &s->i2c1, TYPE_AW_I2C_SUN6I);
+ object_initialize_child(obj, "twi2", &s->i2c2, TYPE_AW_I2C_SUN6I);
+ object_initialize_child(obj, "r_twi", &s->r_twi, TYPE_AW_I2C_SUN6I);
}
static void allwinner_h3_realize(DeviceState *dev, Error **errp)
@@ -432,6 +438,21 @@ static void allwinner_h3_realize(DeviceState *dev, Error **errp)
sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c0), 0,
qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_TWI0));
+ sysbus_realize(SYS_BUS_DEVICE(&s->i2c1), &error_fatal);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->i2c1), 0, s->memmap[AW_H3_DEV_TWI1]);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c1), 0,
+ qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_TWI1));
+
+ sysbus_realize(SYS_BUS_DEVICE(&s->i2c2), &error_fatal);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->i2c2), 0, s->memmap[AW_H3_DEV_TWI2]);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c2), 0,
+ qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_TWI2));
+
+ sysbus_realize(SYS_BUS_DEVICE(&s->r_twi), &error_fatal);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->r_twi), 0, s->memmap[AW_H3_DEV_R_TWI]);
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->r_twi), 0,
+ qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_R_TWI));
+
/* Unimplemented devices */
for (i = 0; i < ARRAY_SIZE(unimplemented); i++) {
create_unimplemented_device(unimplemented[i].device_name,
--
2.34.1
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
` (20 preceding siblings ...)
2023-03-06 15:34 ` [PULL 21/21] hw: arm: allwinner-h3: Fix and complete H3 i2c devices Peter Maydell
@ 2023-03-07 12:42 ` Peter Maydell
21 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-03-07 12:42 UTC (permalink / raw)
To: qemu-devel
On Mon, 6 Mar 2023 at 15:34, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> The following changes since commit f003dd8d81f7d88f4b1f8802309eaa76f6eb223a:
>
> Merge tag 'pull-tcg-20230305' of https://gitlab.com/rth7680/qemu into staging (2023-03-06 10:20:04 +0000)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230306
>
> for you to fetch changes up to 2ddc45954f97cd1d7ee5cbca0def05e980d1da9f:
>
> hw: arm: allwinner-h3: Fix and complete H3 i2c devices (2023-03-06 15:31:24 +0000)
>
> ----------------------------------------------------------------
> target-arm queue:
> * allwinner-h3: Fix I2C controller model for Sun6i SoCs
> * allwinner-h3: Add missing i2c controllers
> * Expose M-profile system registers to gdbstub
> * Expose pauth information to gdbstub
> * Support direct boot for Linux/arm64 EFI zboot images
> * Fix incorrect stage 2 MMU setup validation
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2023-04-20 10:04 Peter Maydell
2023-04-21 10:49 ` Richard Henderson
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2023-04-20 10:04 UTC (permalink / raw)
To: qemu-devel
Hi; here's the first target-arm pullreq for the 8.1 cycle.
Nothing particularly huge in here, just the various things
that had accumulated during the freeze.
thanks
-- PMM
The following changes since commit 2d82c32b2ceaca3dc3da5e36e10976f34bfcb598:
Open 8.1 development tree (2023-04-20 10:05:25 +0100)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230420
for you to fetch changes up to 1ed1f338520cda0574b7e04f5e8e85e049740548:
arm/mcimx7d-sabre: Set fec2-phy-connected property to false (2023-04-20 10:46:43 +0100)
----------------------------------------------------------------
target-arm queue:
* hw/arm: Fix some typos in comments (most found by codespell)
* exynos: Fix out-of-bounds access in exynos4210_gcomp_find debug printf
* Orangepi-PC, Cubieboard: add Allwinner WDT watchdog emulation
* tests/avocado: Add reboot tests to Cubieboard
* hw/timer/imx_epit: Fix bugs in timer limit checking
* target/arm: Remove KVM AArch32 CPU definitions
* hw/arm/virt: Restrict Cortex-A7 check to TCG
* target/arm: Initialize debug capabilities only once
* target/arm: Implement FEAT_PAN3
* docs/devel/kconfig.rst: Fix incorrect markup
* target/arm: Report pauth information to gdb as 'pauth_v2'
* mcimxd7-sabre, mcimx6ul-evk: Correctly model the way the PHY
on the second ethernet device must be configured via the
first one
----------------------------------------------------------------
Akihiko Odaki (1):
target/arm: Initialize debug capabilities only once
Axel Heider (2):
hw/timer/imx_epit: don't shadow variable
hw/timer/imx_epit: fix limit check
Feng Jiang (1):
exynos: Fix out-of-bounds access in exynos4210_gcomp_find debug printf
Guenter Roeck (5):
hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bus
fsl-imx6ul: Add fec[12]-phy-connected properties
arm/mcimx6ul-evk: Set fec1-phy-connected property to false
fsl-imx7: Add fec[12]-phy-connected properties
arm/mcimx7d-sabre: Set fec2-phy-connected property to false
Peter Maydell (5):
target/arm: Pass ARMMMUFaultInfo to merge_syn_data_abort()
target/arm: Don't set ISV when reporting stage 1 faults in ESR_EL2
target/arm: Implement FEAT_PAN3
docs/devel/kconfig.rst: Fix incorrect markup
target/arm: Report pauth information to gdb as 'pauth_v2'
Philippe Mathieu-Daudé (2):
target/arm: Remove KVM AArch32 CPU definitions
hw/arm/virt: Restrict Cortex-A7 check to TCG
Stefan Weil (1):
hw/arm: Fix some typos in comments (most found by codespell)
Strahinja Jankovic (4):
hw/watchdog: Allwinner WDT emulation for system reset
hw/arm: Add WDT to Allwinner-A10 and Cubieboard
hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC
tests/avocado: Add reboot tests to Cubieboard
docs/devel/kconfig.rst | 2 +-
docs/system/arm/cubieboard.rst | 1 +
docs/system/arm/emulation.rst | 1 +
docs/system/arm/orangepi.rst | 1 +
include/hw/arm/allwinner-a10.h | 2 +
include/hw/arm/allwinner-h3.h | 5 +-
include/hw/arm/fsl-imx6ul.h | 1 +
include/hw/arm/fsl-imx7.h | 1 +
include/hw/net/imx_fec.h | 2 +
include/hw/watchdog/allwinner-wdt.h | 123 +++++++++++
target/arm/cpu.h | 5 +
target/arm/kvm-consts.h | 9 +-
target/arm/kvm_arm.h | 8 +
hw/arm/allwinner-a10.c | 7 +
hw/arm/allwinner-h3.c | 8 +
hw/arm/exynos4210.c | 4 +-
hw/arm/fsl-imx6ul.c | 20 ++
hw/arm/fsl-imx7.c | 20 ++
hw/arm/mcimx6ul-evk.c | 2 +
hw/arm/mcimx7d-sabre.c | 2 +
hw/arm/musicpal.c | 2 +-
hw/arm/omap1.c | 2 +-
hw/arm/omap2.c | 2 +-
hw/arm/virt-acpi-build.c | 2 +-
hw/arm/virt.c | 4 +-
hw/arm/xlnx-versal-virt.c | 2 +-
hw/net/imx_fec.c | 27 ++-
hw/timer/exynos4210_mct.c | 13 +-
hw/timer/imx_epit.c | 2 +-
hw/watchdog/allwinner-wdt.c | 416 ++++++++++++++++++++++++++++++++++++
target/arm/cpu64.c | 2 +-
target/arm/cpu_tcg.c | 2 -
target/arm/gdbstub.c | 9 +-
target/arm/kvm.c | 2 +
target/arm/kvm64.c | 18 +-
target/arm/ptw.c | 14 +-
target/arm/tcg/tlb_helper.c | 26 ++-
gdb-xml/aarch64-pauth.xml | 2 +-
hw/arm/Kconfig | 4 +-
hw/watchdog/Kconfig | 4 +
hw/watchdog/meson.build | 1 +
hw/watchdog/trace-events | 7 +
tests/avocado/boot_linux_console.py | 15 +-
43 files changed, 738 insertions(+), 64 deletions(-)
create mode 100644 include/hw/watchdog/allwinner-wdt.h
create mode 100644 hw/watchdog/allwinner-wdt.c
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2023-04-20 10:04 Peter Maydell
@ 2023-04-21 10:49 ` Richard Henderson
2023-04-21 11:54 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Richard Henderson @ 2023-04-21 10:49 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
On 4/20/23 11:04, Peter Maydell wrote:
> Hi; here's the first target-arm pullreq for the 8.1 cycle.
> Nothing particularly huge in here, just the various things
> that had accumulated during the freeze.
>
> thanks
> -- PMM
>
> The following changes since commit 2d82c32b2ceaca3dc3da5e36e10976f34bfcb598:
>
> Open 8.1 development tree (2023-04-20 10:05:25 +0100)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230420
>
> for you to fetch changes up to 1ed1f338520cda0574b7e04f5e8e85e049740548:
>
> arm/mcimx7d-sabre: Set fec2-phy-connected property to false (2023-04-20 10:46:43 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
> * hw/arm: Fix some typos in comments (most found by codespell)
> * exynos: Fix out-of-bounds access in exynos4210_gcomp_find debug printf
> * Orangepi-PC, Cubieboard: add Allwinner WDT watchdog emulation
> * tests/avocado: Add reboot tests to Cubieboard
> * hw/timer/imx_epit: Fix bugs in timer limit checking
> * target/arm: Remove KVM AArch32 CPU definitions
> * hw/arm/virt: Restrict Cortex-A7 check to TCG
> * target/arm: Initialize debug capabilities only once
> * target/arm: Implement FEAT_PAN3
> * docs/devel/kconfig.rst: Fix incorrect markup
> * target/arm: Report pauth information to gdb as 'pauth_v2'
> * mcimxd7-sabre, mcimx6ul-evk: Correctly model the way the PHY
> on the second ethernet device must be configured via the
> first one
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2023-04-21 10:49 ` Richard Henderson
@ 2023-04-21 11:54 ` Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2023-04-21 11:54 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
On Fri, 21 Apr 2023 at 11:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
> Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
8.1 :-) (I created the 8.1 page yesterday.)
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2023-05-30 13:25 Peter Maydell
2023-05-30 14:13 ` Richard Henderson
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2023-05-30 13:25 UTC (permalink / raw)
To: qemu-devel
Hi; here's the latest batch of arm changes. The big thing
in here is the SMMUv3 changes to add stage-2 translation support.
thanks
-- PMM
The following changes since commit aa9bbd865502ed517624ab6fe7d4b5d89ca95e43:
Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu into staging (2023-05-29 14:31:52 -0700)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230530
for you to fetch changes up to b03d0d4f531a8b867e0aac1fab0b876903015680:
docs: sbsa: correct graphics card name (2023-05-30 13:32:46 +0100)
----------------------------------------------------------------
target-arm queue:
* fsl-imx6: Add SNVS support for i.MX6 boards
* smmuv3: Add support for stage 2 translations
* hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop
* hw/arm/xlnx-zynqmp: fix unsigned error when checking the RPUs number
* cleanups for recent Kconfig changes
* target/arm: Explicitly select short-format FSR for M-profile
* tests/qtest: Run arm-specific tests only if the required machine is available
* hw/arm/sbsa-ref: add GIC node into DT
* docs: sbsa: correct graphics card name
* Update copyright dates to 2023
----------------------------------------------------------------
Clément Chigot (1):
hw/arm/xlnx-zynqmp: fix unsigned error when checking the RPUs number
Enze Li (1):
Update copyright dates to 2023
Fabiano Rosas (3):
target/arm: Explain why we need to select ARM_V7M
arm/Kconfig: Keep Kconfig default entries in default.mak as documentation
arm/Kconfig: Make TCG dependence explicit
Marcin Juszkiewicz (2):
hw/arm/sbsa-ref: add GIC node into DT
docs: sbsa: correct graphics card name
Mostafa Saleh (10):
hw/arm/smmuv3: Add missing fields for IDR0
hw/arm/smmuv3: Update translation config to hold stage-2
hw/arm/smmuv3: Refactor stage-1 PTW
hw/arm/smmuv3: Add page table walk for stage-2
hw/arm/smmuv3: Parse STE config for stage-2
hw/arm/smmuv3: Make TLB lookup work for stage-2
hw/arm/smmuv3: Add VMID to TLB tagging
hw/arm/smmuv3: Add CMDs related to stage-2
hw/arm/smmuv3: Add stage-2 support in iova notifier
hw/arm/smmuv3: Add knob to choose translation stage and enable stage-2
Peter Maydell (1):
target/arm: Explicitly select short-format FSR for M-profile
Thomas Huth (1):
tests/qtest: Run arm-specific tests only if the required machine is available
Tommy Wu (1):
hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop.
Vitaly Cheptsov (1):
fsl-imx6: Add SNVS support for i.MX6 boards
docs/conf.py | 2 +-
docs/system/arm/sbsa.rst | 2 +-
configs/devices/aarch64-softmmu/default.mak | 6 +
configs/devices/arm-softmmu/default.mak | 40 ++++
hw/arm/smmu-internal.h | 37 +++
hw/arm/smmuv3-internal.h | 12 +-
include/hw/arm/fsl-imx6.h | 2 +
include/hw/arm/smmu-common.h | 45 +++-
include/hw/arm/smmuv3.h | 4 +
include/qemu/help-texts.h | 2 +-
hw/arm/fsl-imx6.c | 8 +
hw/arm/sbsa-ref.c | 19 +-
hw/arm/smmu-common.c | 209 ++++++++++++++--
hw/arm/smmuv3.c | 357 ++++++++++++++++++++++++----
hw/arm/xlnx-zynqmp.c | 2 +-
hw/dma/xilinx_axidma.c | 11 +-
target/arm/tcg/tlb_helper.c | 13 +-
hw/arm/Kconfig | 123 ++++++----
hw/arm/trace-events | 14 +-
target/arm/Kconfig | 3 +
tests/qtest/meson.build | 7 +-
21 files changed, 773 insertions(+), 145 deletions(-)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2023-05-30 13:25 Peter Maydell
@ 2023-05-30 14:13 ` Richard Henderson
0 siblings, 0 replies; 43+ messages in thread
From: Richard Henderson @ 2023-05-30 14:13 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
On 5/30/23 06:25, Peter Maydell wrote:
> Hi; here's the latest batch of arm changes. The big thing
> in here is the SMMUv3 changes to add stage-2 translation support.
>
> thanks
> -- PMM
>
> The following changes since commit aa9bbd865502ed517624ab6fe7d4b5d89ca95e43:
>
> Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu into staging (2023-05-29 14:31:52 -0700)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230530
>
> for you to fetch changes up to b03d0d4f531a8b867e0aac1fab0b876903015680:
>
> docs: sbsa: correct graphics card name (2023-05-30 13:32:46 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
> * fsl-imx6: Add SNVS support for i.MX6 boards
> * smmuv3: Add support for stage 2 translations
> * hw/dma/xilinx_axidma: Check DMASR.HALTED to prevent infinite loop
> * hw/arm/xlnx-zynqmp: fix unsigned error when checking the RPUs number
> * cleanups for recent Kconfig changes
> * target/arm: Explicitly select short-format FSR for M-profile
> * tests/qtest: Run arm-specific tests only if the required machine is available
> * hw/arm/sbsa-ref: add GIC node into DT
> * docs: sbsa: correct graphics card name
> * Update copyright dates to 2023
Printf failure on aarch64-macos and cross-mipsel:
https://gitlab.com/qemu-project/qemu/-/jobs/4374716505#L3662
https://gitlab.com/qemu-project/qemu/-/jobs/4374716612#L4963
../hw/arm/smmuv3.c:423:23: error: format specifies type 'unsigned long' but the argument
has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
cfg->s2cfg.vttb, cfg->s2cfg.eff_ps);
^~~~~~~~~~~~~~~
/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/include/qemu/log.h:54:30:
note: expanded from macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
~~~ ^~~~~~~~~~~
r~
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2024-01-16 15:12 Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2024-01-16 15:12 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c:
Merge tag 'pull-testing-updates-120124-2' of https://gitlab.com/stsquad/qemu into staging (2024-01-12 14:02:53 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240116
for you to fetch changes up to 7ec39730a9cc443c752d4cad2bf1c00467551ef5:
load_elf: fix iterator's type for elf file processing (2024-01-15 17:14:22 +0000)
----------------------------------------------------------------
target-arm queue:
* docs/devel/docs: Document .hx file syntax
* arm_pamax() no longer needs to do feature propagation
* docs/system/arm/virt.rst: Improve 'highmem' option docs
* STM32L4x5 Implement SYSCFG and EXTI devices
* Nuvoton: Implement PCI Mailbox module
* Nuvoton: Implement GMAC module
* hw/timer: fix systick trace message
* hw/arm/virt: Consolidate valid CPU types
* load_elf: fix iterator's type for elf file processing
----------------------------------------------------------------
Anastasia Belova (1):
load_elf: fix iterator's type for elf file processing
Gavin Shan (1):
hw/arm/virt: Consolidate valid CPU types
Hao Wu (3):
hw/misc: Add Nuvoton's PCI Mailbox Module
hw/misc: Add qtest for NPCM7xx PCI Mailbox
hw/arm: Add GMAC devices to NPCM7XX SoC
Inès Varhol (6):
hw/misc: Implement STM32L4x5 EXTI
hw/arm: Connect STM32L4x5 EXTI to STM32L4x5 SoC
tests/qtest: Add STM32L4x5 EXTI QTest testcase
hw/misc: Implement STM32L4x5 SYSCFG
hw/arm: Connect STM32L4x5 SYSCFG to STM32L4x5 SoC
tests/qtest: Add STM32L4x5 SYSCFG QTest testcase
Nabih Estefan Diaz (4):
tests/qtest: Creating qtest for GMAC Module
hw/net: GMAC Rx Implementation
hw/net: GMAC Tx Implementation
tests/qtest: Adding PCS Module test to GMAC Qtest
Peter Maydell (5):
docs/devel/docs: Document .hx file syntax
target/arm: arm_pamax() no longer needs to do feature propagation
docs/system/arm/virt.rst: Improve 'highmem' option docs
hw/arm: Add PCI mailbox module to Nuvoton SoC
hw/net: Add NPCMXXX GMAC device
Samuel Tardieu (1):
hw/timer: fix systick trace message
MAINTAINERS | 1 +
docs/devel/docs.rst | 60 +++
docs/devel/index-build.rst | 1 +
docs/system/arm/b-l475e-iot01a.rst | 7 +-
docs/system/arm/nuvoton.rst | 2 +
docs/system/arm/virt.rst | 8 +-
include/hw/arm/npcm7xx.h | 4 +
include/hw/arm/stm32l4x5_soc.h | 5 +
include/hw/elf_ops.h | 2 +-
include/hw/misc/npcm7xx_pci_mbox.h | 81 ++++
include/hw/misc/stm32l4x5_exti.h | 51 ++
include/hw/misc/stm32l4x5_syscfg.h | 54 +++
include/hw/net/npcm_gmac.h | 340 +++++++++++++
hw/arm/npcm7xx.c | 53 +-
hw/arm/stm32l4x5_soc.c | 73 ++-
hw/arm/virt.c | 8 +-
hw/misc/npcm7xx_pci_mbox.c | 324 +++++++++++++
hw/misc/stm32l4x5_exti.c | 290 +++++++++++
hw/misc/stm32l4x5_syscfg.c | 266 ++++++++++
hw/net/npcm_gmac.c | 939 ++++++++++++++++++++++++++++++++++++
target/arm/ptw.c | 14 +-
tests/qtest/npcm7xx_pci_mbox-test.c | 238 +++++++++
tests/qtest/npcm_gmac-test.c | 341 +++++++++++++
tests/qtest/stm32l4x5_exti-test.c | 524 ++++++++++++++++++++
tests/qtest/stm32l4x5_syscfg-test.c | 331 +++++++++++++
hmp-commands-info.hx | 10 +-
hmp-commands.hx | 10 +-
hw/arm/Kconfig | 2 +
hw/misc/Kconfig | 6 +
hw/misc/meson.build | 3 +
hw/misc/trace-events | 16 +
hw/net/meson.build | 2 +-
hw/net/trace-events | 19 +
hw/timer/trace-events | 2 +-
qemu-img-cmds.hx | 2 +
qemu-options.hx | 2 +
tests/qtest/meson.build | 8 +
37 files changed, 4066 insertions(+), 33 deletions(-)
create mode 100644 docs/devel/docs.rst
create mode 100644 include/hw/misc/npcm7xx_pci_mbox.h
create mode 100644 include/hw/misc/stm32l4x5_exti.h
create mode 100644 include/hw/misc/stm32l4x5_syscfg.h
create mode 100644 include/hw/net/npcm_gmac.h
create mode 100644 hw/misc/npcm7xx_pci_mbox.c
create mode 100644 hw/misc/stm32l4x5_exti.c
create mode 100644 hw/misc/stm32l4x5_syscfg.c
create mode 100644 hw/net/npcm_gmac.c
create mode 100644 tests/qtest/npcm7xx_pci_mbox-test.c
create mode 100644 tests/qtest/npcm_gmac-test.c
create mode 100644 tests/qtest/stm32l4x5_exti-test.c
create mode 100644 tests/qtest/stm32l4x5_syscfg-test.c
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2024-04-30 16:48 Peter Maydell
2024-04-30 23:01 ` Richard Henderson
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2024-04-30 16:48 UTC (permalink / raw)
To: qemu-devel
Here's another arm pullreq; nothing too exciting in here I think.
thanks
-- PMM
The following changes since commit 5fee33d97a7f2e95716417bd164f2f5264acd976:
Merge tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu into staging (2024-04-29 14:34:25 -0700)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240430
for you to fetch changes up to a0c325c4b05cf7815739d6a84e567b95c8c5be7e:
tests/qtest : Add testcase for DM163 (2024-04-30 16:05:08 +0100)
----------------------------------------------------------------
target-arm queue:
* hw/core/clock: allow clock_propagate on child clocks
* hvf: arm: Remove unused PL1_WRITE_MASK define
* target/arm: Restrict translation disabled alignment check to VMSA
* docs/system/arm/emulation.rst: Add missing implemented features
* target/arm: Enable FEAT_CSV2_3, FEAT_ETS2, FEAT_Spec_FPACC for 'max'
* tests/avocado: update sunxi kernel from armbian to 6.6.16
* target/arm: Make new CPUs default to 1GHz generic timer
* hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields
* hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size
* hw/arm/npcm7xx: Store derivative OTP fuse key in little endian
* hw/arm: Add DM163 display to B-L475E-IOT01A board
----------------------------------------------------------------
Alexandra Diupina (1):
hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields
Inès Varhol (5):
hw/display : Add device DM163
hw/arm : Pass STM32L4x5 SYSCFG gpios to STM32L4x5 SoC
hw/arm : Create Bl475eMachineState
hw/arm : Connect DM163 to B-L475E-IOT01A
tests/qtest : Add testcase for DM163
Peter Maydell (10):
docs/system/arm/emulation.rst: Add missing implemented features
target/arm: Enable FEAT_CSV2_3 for -cpu max
target/arm: Enable FEAT_ETS2 for -cpu max
target/arm: Implement ID_AA64MMFR3_EL1
target/arm: Enable FEAT_Spec_FPACC for -cpu max
tests/avocado: update sunxi kernel from armbian to 6.6.16
target/arm: Refactor default generic timer frequency handling
hw/arm/sbsa-ref: Force CPU generic timer to 62.5MHz
hw/watchdog/sbsa_gwdt: Make watchdog timer frequency a QOM property
target/arm: Default to 1GHz cntfrq for 'max' and new CPUs
Philippe Mathieu-Daudé (1):
hw/arm/npcm7xx: Store derivative OTP fuse key in little endian
Raphael Poggi (1):
hw/core/clock: allow clock_propagate on child clocks
Richard Henderson (1):
target/arm: Restrict translation disabled alignment check to VMSA
Thomas Huth (1):
hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size
Zenghui Yu (1):
hvf: arm: Remove PL1_WRITE_MASK
docs/system/arm/b-l475e-iot01a.rst | 3 +-
docs/system/arm/emulation.rst | 42 ++++-
include/hw/display/dm163.h | 59 ++++++
include/hw/watchdog/sbsa_gwdt.h | 3 +-
target/arm/cpu.h | 28 +++
target/arm/internals.h | 15 +-
hw/arm/b-l475e-iot01a.c | 105 +++++++++--
hw/arm/npcm7xx.c | 3 +-
hw/arm/sbsa-ref.c | 16 ++
hw/arm/stm32l4x5_soc.c | 6 +-
hw/char/stm32l4x5_usart.c | 1 +
hw/core/clock.c | 1 -
hw/core/machine.c | 4 +-
hw/display/dm163.c | 349 ++++++++++++++++++++++++++++++++++++
hw/dma/xlnx_dpdma.c | 20 +--
hw/watchdog/sbsa_gwdt.c | 15 +-
target/arm/cpu.c | 42 +++--
target/arm/cpu64.c | 2 +
target/arm/helper.c | 22 +--
target/arm/hvf/hvf.c | 3 +-
target/arm/kvm.c | 2 +
target/arm/tcg/cpu32.c | 6 +-
target/arm/tcg/cpu64.c | 28 ++-
target/arm/tcg/hflags.c | 12 +-
tests/qtest/dm163-test.c | 194 ++++++++++++++++++++
tests/qtest/stm32l4x5_gpio-test.c | 13 +-
tests/qtest/stm32l4x5_syscfg-test.c | 17 +-
hw/arm/Kconfig | 1 +
hw/display/Kconfig | 3 +
hw/display/meson.build | 1 +
hw/display/trace-events | 14 ++
tests/avocado/boot_linux_console.py | 70 ++++----
tests/avocado/replay_kernel.py | 8 +-
tests/qtest/meson.build | 2 +
34 files changed, 987 insertions(+), 123 deletions(-)
create mode 100644 include/hw/display/dm163.h
create mode 100644 hw/display/dm163.c
create mode 100644 tests/qtest/dm163-test.c
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2024-04-30 16:48 Peter Maydell
@ 2024-04-30 23:01 ` Richard Henderson
0 siblings, 0 replies; 43+ messages in thread
From: Richard Henderson @ 2024-04-30 23:01 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
On 4/30/24 09:48, Peter Maydell wrote:
> Here's another arm pullreq; nothing too exciting in here I think.
>
> thanks
> -- PMM
>
> The following changes since commit 5fee33d97a7f2e95716417bd164f2f5264acd976:
>
> Merge tag 'samuel-thibault' ofhttps://people.debian.org/~sthibault/qemu into staging (2024-04-29 14:34:25 -0700)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240430
>
> for you to fetch changes up to a0c325c4b05cf7815739d6a84e567b95c8c5be7e:
>
> tests/qtest : Add testcase for DM163 (2024-04-30 16:05:08 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
> * hw/core/clock: allow clock_propagate on child clocks
> * hvf: arm: Remove unused PL1_WRITE_MASK define
> * target/arm: Restrict translation disabled alignment check to VMSA
> * docs/system/arm/emulation.rst: Add missing implemented features
> * target/arm: Enable FEAT_CSV2_3, FEAT_ETS2, FEAT_Spec_FPACC for 'max'
> * tests/avocado: update sunxi kernel from armbian to 6.6.16
> * target/arm: Make new CPUs default to 1GHz generic timer
> * hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields
> * hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size
> * hw/arm/npcm7xx: Store derivative OTP fuse key in little endian
> * hw/arm: Add DM163 display to B-L475E-IOT01A board
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2024-07-30 9:39 Peter Maydell
2024-07-31 1:18 ` Richard Henderson
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2024-07-30 9:39 UTC (permalink / raw)
To: qemu-devel
Arm pullreq: these are all bugfixes. I've included a handful
of my fixes for various non-arm minor Coverity issues too.
thanks
-- PMM
The following changes since commit 93b799fafd9170da3a79a533ea6f73a18de82e22:
Merge tag 'pull-ppc-for-9.1-2-20240726-1' of https://gitlab.com/npiggin/qemu into staging (2024-07-26 15:10:45 +1000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240730
for you to fetch changes up to 73188068d7ba40c8a37b4763db38bb1ce24ca07d:
system/physmem: Where we assume we have a RAM MR, assert it (2024-07-29 17:03:35 +0100)
----------------------------------------------------------------
target-arm queue:
* hw/char/bcm2835_aux: Fix assert when receive FIFO fills up
* hw/arm/smmuv3: Assert input to oas2bits() is valid
* target/arm/kvm: Set PMU for host only when available
* target/arm/kvm: Do not silently remove PMU
* hvf: arm: Properly disable PMU
* hvf: arm: Do not advance PC when raising an exception
* hw/misc/bcm2835_property: several minor bugfixes
* target/arm: Don't assert for 128-bit tile accesses when SVL is 128
* target/arm: Fix UMOPA/UMOPS of 16-bit values
* target/arm: Ignore SMCR_EL2.LEN and SVCR_EL2.LEN if EL2 is not enabled
* system/physmem: Where we assume we have a RAM MR, assert it
* sh4, i386, m68k, xtensa, tricore, arm: fix minor Coverity issues
----------------------------------------------------------------
Akihiko Odaki (5):
target/arm/kvm: Set PMU for host only when available
target/arm/kvm: Do not silently remove PMU
hvf: arm: Raise an exception for sysreg by default
hvf: arm: Properly disable PMU
hvf: arm: Do not advance PC when raising an exception
Frederik van Hövell (1):
hw/char/bcm2835_aux: Fix assert when receive FIFO fills up
Mostafa Saleh (1):
hw/arm/smmuv3: Assert input to oas2bits() is valid
Peter Maydell (14):
hw/misc/bcm2835_property: Fix handling of FRAMEBUFFER_SET_PALETTE
hw/misc/bcm2835_property: Avoid overflow in OTP access properties
hw/misc/bcm2835_property: Restrict scope of start_num, number, otp_row
hw/misc/bcm2835_property: Reduce scope of variables in mbox push function
target/arm: Don't assert for 128-bit tile accesses when SVL is 128
target/arm: Fix UMOPA/UMOPS of 16-bit values
target/arm: Avoid shifts by -1 in tszimm_shr() and tszimm_shl()
target/arm: Ignore SMCR_EL2.LEN and SVCR_EL2.LEN if EL2 is not enabled
target/tricore: Use unsigned types for bitops in helper_eq_b()
target/xtensa: Make use of 'segment' in pptlb helper less confusing
target/m68k: avoid shift into sign bit in dump_address_map()
target/i386: Remove dead assignment to ss in do_interrupt64()
target/sh4: Avoid shift into sign bit in update_itlb_use()
system/physmem: Where we assume we have a RAM MR, assert it
hw/arm/smmuv3-internal.h | 3 +-
hw/char/bcm2835_aux.c | 2 +-
hw/misc/bcm2835_property.c | 91 +++++++------
system/physmem.c | 18 ++-
target/arm/helper.c | 2 +-
target/arm/hvf/hvf.c | 302 +++++++++++++++++++++--------------------
target/arm/kvm.c | 7 +-
target/arm/tcg/sme_helper.c | 8 +-
target/arm/tcg/translate-sme.c | 10 +-
target/arm/tcg/translate-sve.c | 18 ++-
target/i386/tcg/seg_helper.c | 5 +-
target/m68k/helper.c | 7 +-
target/sh4/helper.c | 2 +-
target/tricore/op_helper.c | 4 +-
target/xtensa/mmu_helper.c | 4 +-
15 files changed, 262 insertions(+), 221 deletions(-)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2024-07-30 9:39 Peter Maydell
@ 2024-07-31 1:18 ` Richard Henderson
0 siblings, 0 replies; 43+ messages in thread
From: Richard Henderson @ 2024-07-31 1:18 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
On 7/30/24 19:39, Peter Maydell wrote:
> Arm pullreq: these are all bugfixes. I've included a handful
> of my fixes for various non-arm minor Coverity issues too.
>
> thanks
> -- PMM
>
> The following changes since commit 93b799fafd9170da3a79a533ea6f73a18de82e22:
>
> Merge tag 'pull-ppc-for-9.1-2-20240726-1' ofhttps://gitlab.com/npiggin/qemu into staging (2024-07-26 15:10:45 +1000)
>
> are available in the Git repository at:
>
> https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240730
>
> for you to fetch changes up to 73188068d7ba40c8a37b4763db38bb1ce24ca07d:
>
> system/physmem: Where we assume we have a RAM MR, assert it (2024-07-29 17:03:35 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
> * hw/char/bcm2835_aux: Fix assert when receive FIFO fills up
> * hw/arm/smmuv3: Assert input to oas2bits() is valid
> * target/arm/kvm: Set PMU for host only when available
> * target/arm/kvm: Do not silently remove PMU
> * hvf: arm: Properly disable PMU
> * hvf: arm: Do not advance PC when raising an exception
> * hw/misc/bcm2835_property: several minor bugfixes
> * target/arm: Don't assert for 128-bit tile accesses when SVL is 128
> * target/arm: Fix UMOPA/UMOPS of 16-bit values
> * target/arm: Ignore SMCR_EL2.LEN and SVCR_EL2.LEN if EL2 is not enabled
> * system/physmem: Where we assume we have a RAM MR, assert it
> * sh4, i386, m68k, xtensa, tricore, arm: fix minor Coverity issues
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 43+ messages in thread
* [PULL 00/21] target-arm queue
@ 2025-03-07 15:06 Peter Maydell
2025-03-09 0:41 ` Stefan Hajnoczi
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2025-03-07 15:06 UTC (permalink / raw)
To: qemu-devel
Hi; here's a target-arm pullreq to go in before softfreeze.
This is actually pretty much entirely bugfixes (since the
SEL2 timers we implement here are a missing part of a feature
we claim to already implement).
thanks
-- PMM
The following changes since commit 98c7362b1efe651327385a25874a73e008c6549e:
Merge tag 'accel-cpus-20250306' of https://github.com/philmd/qemu into staging (2025-03-07 07:39:49 +0800)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20250307
for you to fetch changes up to 0ce0739d46983e5e88fa9c149cb305689c9d8c6f:
target/rx: Remove TCG_CALL_NO_WG from helpers which write env (2025-03-07 15:03:20 +0000)
----------------------------------------------------------------
target-arm queue:
* hw/arm/smmu-common: Remove the repeated ttb field
* hw/gpio: npcm7xx: fixup out-of-bounds access
* tests/functional/test_arm_sx1: Check whether the serial console is working
* target/arm: Fix minor bugs in generic timer register handling
* target/arm: Implement SEL2 physical and virtual timers
* target/arm: Correct STRD, LDRD atomicity and fault behaviour
* target/arm: Make dummy debug registers RAZ, not NOP
* util/qemu-timer.c: Don't warp timer from timerlist_rearm()
* include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN
* hw/arm/smmu: Introduce smmu_configs_inv_sid_range() helper
* target/rx: Set exception vector base to 0xffffff80
* target/rx: Remove TCG_CALL_NO_WG from helpers which write env
----------------------------------------------------------------
Alex Bennée (4):
target/arm: Implement SEL2 physical and virtual timers
target/arm: Document the architectural names of our GTIMERs
hw/arm: enable secure EL2 timers for virt machine
hw/arm: enable secure EL2 timers for sbsa machine
JianChunfu (2):
hw/arm/smmu-common: Remove the repeated ttb field
hw/arm/smmu: Introduce smmu_configs_inv_sid_range() helper
Keith Packard (2):
target/rx: Set exception vector base to 0xffffff80
target/rx: Remove TCG_CALL_NO_WG from helpers which write env
Patrick Venture (1):
hw/gpio: npcm7xx: fixup out-of-bounds access
Peter Maydell (11):
target/arm: Apply correct timer offset when calculating deadlines
target/arm: Don't apply CNTVOFF_EL2 for EL2_VIRT timer
target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secure EL2 is enabled
target/arm: Always apply CNTVOFF_EL2 for CNTV_TVAL_EL02 accesses
target/arm: Refactor handling of timer offset for direct register accesses
target/arm: Correct LDRD atomicity and fault behaviour
target/arm: Correct STRD atomicity
target/arm: Drop unused address_offset from op_addr_{rr, ri}_post()
target/arm: Make dummy debug registers RAZ, not NOP
util/qemu-timer.c: Don't warp timer from timerlist_rearm()
include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN
Thomas Huth (1):
tests/functional/test_arm_sx1: Check whether the serial console is working
MAINTAINERS | 1 +
hw/arm/smmu-internal.h | 5 -
include/exec/memop.h | 8 +-
include/hw/arm/bsa.h | 2 +
include/hw/arm/smmu-common.h | 7 +-
target/arm/cpu.h | 2 +
target/arm/gtimer.h | 14 +-
target/arm/internals.h | 5 +-
target/rx/helper.h | 34 ++--
hw/arm/sbsa-ref.c | 2 +
hw/arm/smmu-common.c | 21 +++
hw/arm/smmuv3.c | 19 +--
hw/arm/virt.c | 2 +
hw/gpio/npcm7xx_gpio.c | 3 +-
target/arm/cpu.c | 4 +
target/arm/debug_helper.c | 7 +-
target/arm/helper.c | 324 ++++++++++++++++++++++++++++++++-------
target/arm/tcg/op_helper.c | 8 +-
target/arm/tcg/translate.c | 147 +++++++++++-------
target/rx/helper.c | 2 +-
util/qemu-timer.c | 4 -
hw/arm/trace-events | 3 +-
tests/functional/test_arm_sx1.py | 7 +-
23 files changed, 455 insertions(+), 176 deletions(-)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [PULL 00/21] target-arm queue
2025-03-07 15:06 Peter Maydell
@ 2025-03-09 0:41 ` Stefan Hajnoczi
0 siblings, 0 replies; 43+ messages in thread
From: Stefan Hajnoczi @ 2025-03-09 0:41 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2025-03-10 3:57 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 15:34 [PULL 00/21] target-arm queue Peter Maydell
2023-03-06 15:34 ` [PULL 01/21] target/arm: Normalize aarch64 gdbstub get/set function names Peter Maydell
2023-03-06 15:34 ` [PULL 02/21] target/arm: Unexport arm_gen_dynamic_sysreg_xml Peter Maydell
2023-03-06 15:34 ` [PULL 03/21] target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c Peter Maydell
2023-03-06 15:34 ` [PULL 04/21] target/arm: Split out output_vector_union_type Peter Maydell
2023-03-06 15:34 ` [PULL 05/21] target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml Peter Maydell
2023-03-06 15:34 ` [PULL 06/21] target/arm: Hoist pred_width " Peter Maydell
2023-03-06 15:34 ` [PULL 07/21] target/arm: Fix svep width " Peter Maydell
2023-03-06 15:34 ` [PULL 08/21] target/arm: Add name argument to output_vector_union_type Peter Maydell
2023-03-06 15:34 ` [PULL 09/21] target/arm: Simplify iteration over bit widths Peter Maydell
2023-03-06 15:34 ` [PULL 10/21] target/arm: Create pauth_ptr_mask Peter Maydell
2023-03-06 15:34 ` [PULL 11/21] target/arm: Implement gdbstub pauth extension Peter Maydell
2023-03-06 15:34 ` [PULL 12/21] target/arm: Export arm_v7m_mrs_control Peter Maydell
2023-03-06 15:34 ` [PULL 13/21] target/arm: Export arm_v7m_get_sp_ptr Peter Maydell
2023-03-06 15:34 ` [PULL 14/21] target/arm: Implement gdbstub m-profile systemreg and secext Peter Maydell
2023-03-06 15:34 ` [PULL 15/21] target/arm: Handle m-profile in arm_is_secure Peter Maydell
2023-03-06 15:34 ` [PULL 16/21] target/arm: Stub arm_hcr_el2_eff for m-profile Peter Maydell
2023-03-06 15:34 ` [PULL 17/21] target/arm: Diagnose incorrect usage of arm_is_secure subroutines Peter Maydell
2023-03-06 15:34 ` [PULL 18/21] target/arm: Rewrite check_s2_mmu_setup Peter Maydell
2023-03-06 15:34 ` [PULL 19/21] hw: arm: Support direct boot for Linux/arm64 EFI zboot images Peter Maydell
2023-03-06 15:34 ` [PULL 20/21] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs Peter Maydell
2023-03-06 15:34 ` [PULL 21/21] hw: arm: allwinner-h3: Fix and complete H3 i2c devices Peter Maydell
2023-03-07 12:42 ` [PULL 00/21] target-arm queue Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2025-03-07 15:06 Peter Maydell
2025-03-09 0:41 ` Stefan Hajnoczi
2024-07-30 9:39 Peter Maydell
2024-07-31 1:18 ` Richard Henderson
2024-04-30 16:48 Peter Maydell
2024-04-30 23:01 ` Richard Henderson
2024-01-16 15:12 Peter Maydell
2023-05-30 13:25 Peter Maydell
2023-05-30 14:13 ` Richard Henderson
2023-04-20 10:04 Peter Maydell
2023-04-21 10:49 ` Richard Henderson
2023-04-21 11:54 ` Peter Maydell
2022-03-18 13:22 Peter Maydell
2022-03-19 10:09 ` Peter Maydell
2021-08-02 11:57 Peter Maydell
2021-08-02 13:51 ` Peter Maydell
2021-02-02 17:54 Peter Maydell
2021-02-03 9:22 ` Philippe Mathieu-Daudé
2021-02-03 10:12 ` P J P
2021-01-12 16:57 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).