The Facebook Catalina BMC machine is supported by hw/arm but has never
been listed in the Aspeed documentation. Add it to the AST2600 machine
table.
While at it, shorten the document title. Listing every machine name in
the title duplicates the tables right below it, and made the title (and
its underline) grow past 350 columns. The machine list stays available
where it is readable, in the per-SoC tables.
Reviewed-by: Jamin Lin <jaminlin1207@gmail.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
Link: https://lore.kernel.org/qemu-devel/20261015-bmc-minerva-v3-1-7d50c8a108e5@free.fr
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Add a new machine definition ast1080-evb to support the Aspeed AST1080
evaluation board. The new EVB reuses the same BIC framework used by
AST1040, as both SoCs share the same core peripherals and controller
designs.
The AST1080 EVB machine initializes the ast1080-a0 SoC.
This enables QEMU to boot and emulate firmware images for AST1080-based
platforms.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The AST1080 provides an SMBus Filter Controller (I2C filter) at
0x74c14000, but the controller is not modeled yet.
This controller is only available on the AST1080. The AST1040 does not
have it, so it is added to the AST1080 specific init and realize
functions instead of the common AST10x0 G2 ones.
Add the register region as an unimplemented device to reflect the
AST1080 memory map.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The AST1080 provides three QSPI Filter Controllers (SPI monitors) at
the following addresses:
QSPI filter #0: 0x74c15000
QSPI filter #1: 0x74c16000
QSPI filter #2: 0x74c17000
These controllers are only available on the AST1080. The AST1040 does
not have them, so they are added to the AST1080 specific init and
realize functions instead of the common AST10x0 G2 ones.
The controllers are not modeled yet. Add the register regions as
unimplemented devices to reflect the AST1080 memory map.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Add initial support for the Aspeed AST1080 SoC. The AST1080 reuses most
of the AST1040 peripheral device models, as the two SoCs share nearly
the same controllers including WDT, SCU, GPIO, SGPIO, ADC, I2C, FMC,
and SPI.
The common initialization and realization functions,
aspeed_soc_ast10x0_g2_init() and aspeed_soc_ast10x0_g2_realize(),
introduced in the previous patches are reused, so AST1080 can
instantiate the existing AST1040 device models without defining
duplicate device types.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
AST1040 and AST1080 are the next-generation SoCs of AST1030 and AST1060,
respectively.
The AST1030 and AST1060 SoCs share common realization through
aspeed_soc_ast10x0_realize(). Similarly, introduce
aspeed_soc_ast10x0_g2_realize() to provide common realization for the
AST1040 and AST1080 SoCs.
Move the shared AST1040 realization into the new common function so that
it can be reused when adding AST1080 support. The PECI and eSPI
controllers are only available on the AST1040, so their realization is
kept in aspeed_soc_ast1040_realize().
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
AST1040 and AST1080 are the next-generation SoCs of AST1030 and AST1060,
respectively.
The AST1030 and AST1060 SoCs share common initialization through
aspeed_soc_ast10x0_init(). Similarly, introduce
aspeed_soc_ast10x0_g2_init() to provide common initialization for the
AST1040 and AST1080 SoCs.
Move the shared AST1040 initialization into the new common function so
that it can be reused when adding AST1080 support. The PECI and eSPI
controllers are only available on the AST1040, so their initialization
is kept in aspeed_soc_ast1040_init().
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261015063625.186708-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Previously, ASPEED hosted the AST1040 pre-built image in the Zephyr GitHub repository
as a temporary solution for QEMU functional tests.
ASPEED now provides official AST1040/AST1080 pre-built images in the aspeed-mcu-fw-hub
repository, starting with release v01.00.
Update the AST1040 functional test to use the official pre-built image from
aspeed-mcu-fw-hub instead of the Zephyr repository.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-14-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The AST1040 provides filter register regions for the FMC, SPI0 and SPI1
controllers at the following addresses:
FMC filter: 0x74000400
SPI0 filter: 0x74010400
SPI1 filter: 0x74020400
These filters are not modeled yet. Add the register regions as
unimplemented devices to reflect the AST1040 memory map.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The W25Q32DW and W25Q33PW use the same JEDEC ID (0xef6016), but
have different part names.
Add the SFDP data table for the Winbond W25Q33PW flash device. The table
was generated from a real device under Linux by dumping the SFDP content
using the following command:
Example:
```
hexdump -v -e '8/1 "0x%02x, " "\n"' \
/sys/bus/spi/devices/spi1.0/spi-nor/sfdp
```
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The DMA flash address register (SPI084) holds the offset of the
flash access within the controller's flash window. The AST2700 FMC,
SPI0 and SPI1 controllers use a dma_flash_mask of 0x2FFFFFFC, which
clears bit 28, and SPI2 uses 0x0FFFFFFC, which limits DMA to the
first 256MB of the window.
With the default segment layout, FMC CS2 is mapped at offset
0x10000000. A DMA read from that offset is masked to 0x0 and returns
data from CS0 instead of CS2.
The Linux driver programs SPI084 with the window offset masked by
0x7fffffff, so bit 28 is a valid address bit.
Set dma_flash_mask to 0x3FFFFFFC for all AST2700 controllers to cover
the full 1GB flash window.
Fixes: bdb3748dba ("aspeed/smc: Add AST2700 support")
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
The AST2700 Address Decoding Range Registers (SPI030 - SPI03C) define
the end address as an exclusive upper bound, with a unit of 64KB:
StartAdr <= CEx < EndAdr
When the start address equals the end address, the decoding is
disabled.
However, aspeed_2700_smc_segment_to_reg() and
aspeed_2700_smc_reg_to_segment() treat the end address as inclusive.
The end offset is programmed as (addr + size - 1) and an extra 64KB is
added back when decoding it. As a result, every segment is 64KB larger
than the range defined by the register and overlaps the next chip
select.
The issue can be reproduced by booting an AST2700 ASPEED SDK image
with "-d guest_errors", which reports a lot of segment overlap errors
such as:
aspeed_smc_flash_set_segment: new segment for CS0 is not aligned :
[ 0x100000000 - 0x108010000 ]
aspeed_smc_flash_overlap: new segment CS1 [ 0x108000000 - 0x110010000 ]
overlaps with CS0 [ 0x100000000 - 0x108010000 ]
Fix the segment helpers to use an exclusive end address, so that the
decoded segments match the definition in the AST2700 datasheet.
Fixes: bdb3748dba ("aspeed/smc: Add AST2700 support")
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Pull request
virtio-blk serial truncation deprecation by Kevin Wolf and a qed block driver
fix for CVE-2026-118594.
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmrk8S8ACgkQnKSrs4Gr
# c8iOVgf/T1KrkxCdQlFn8ELWcBS742OdgBHrRjL+kVufTZ5fdF+CVHXvliYFLVLh
# L8pziGQqJpztnDLe7JKArISW5CNbAFpYOujt8WdL13l300kxFKOpoBj2NFjT0WGa
# QxRsHT7jZyCDyWdrhNfUVFeHGDsFfzo6NSYIP8LDgS3XyYREWSiLCbpeRZD9E7l2
# 7f2HngvNPbSI55h4Nq++adkzjFCaFjeVt3AEO5Zo80erLZz7GVPIyfSg2TjcdYWB
# kZGpouhsKNSHeP/aYoccEaKB3QTJ0Op4rEYY5G+k0uszotXrNtpTFB3mqJUy/D6D
# Zf73t1Zv6zZoiBK+r0VN7j6djixmqQ==
# =pkm0
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 30 Oct 2026 02:34:07 PM CDT
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [unknown]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
virtio-blk-test: Test truncated serial
virtio-blk: Deprecate silent truncation of serial
virtio-blk-test: Add a basic GET_ID test case
virtio-blk: Implement full NUL padding for GET_ID
qed: fix incorrect denominator in qed_bytes_to_clusters() (CVE-2026-118594)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit a8686a9b, which made serial a qdev property instead of relying on
-drive options, accidentally allowed specifying serial strings of
arbitraty length while the virtio-blk protocol can only communicate 20
characters to the guest. This means that a longer serial number on the
command line is silently truncated to 20 characters from the guest
perspective.
This is obviously bad behaviour. People are specifying longer serials in
practice and guests will see something different than what was
configured. Instead of silent truncation, this should be an error.
Deprecate the silent truncation for now as a first step towards making
it an error later.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20261029231001.194240-4-kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
The spec requires not only NUL termination of the device ID string, but
NUL padding:
VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the
device into data. The device ID string is a NUL-padded ASCII string
up to 20 bytes long. If the string is 20 bytes long then there is no
NUL terminator.
Zero out all of the remaining bytes in the request buffer.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20261029231001.194240-2-kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
cluster_size - 1 is often used in bitwise mask operations in qed.h, so
this bug is probably a copy-paste error. qed_bytes_to_clusters() uses a
division and the denominator should be the full cluster_size value.
This bug can be used to leak heap memory to the guest with a QED file
where cluster_size <= 32 KB (the default is 64 KB) and table_size = 8 or
16 (the default is 4).
Fixes: CVE-2026-118594
Fixes: 298800cae7 ("qed: Table, L2 cache, and cluster functions")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4737
Reported-by: oxsignal <awo@kakao.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
accel/tcg: Fix false awakening of gdb
accel/tcg: Do not flush and retry in place in tb_gen_code
tcg: Adjust NONNULL annotation on *_diff functions
tcg: Add tcg_gen_lea_{i32,i64,tl}
target/alpha: Use tcg_gen_lea_i64 for S{4,8}ADD{L,Q}
target/loongarch: Use tcg_gen_lea_tl for ALSL
target/riscv: Use tcg_gen_lea_tl for SH*ADD
target/s390x: Use tcg_gen_lea_i64 in get_address
target/i386: Use tcg_gen_lea_tl in gen_lea_modrm_1
target/mips: Use tcg_gen_lea() for [D]LSA and MXU S32LD*V opcodes
# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmrkmGIdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/5Xgf9HJVBSOjBsW69SkQD
# 353u0YoAsfNCly6zSEqevaGqKZxRVwqyI1C6NzlP8e7FraxKphJGdizH6W3LeNia
# M6laDKkcnoPNkHDfHajZAkK8l7Uu7jW7CMf6jN21ZHSjUXf6RV9Oqbx1ZL5HtyF8
# CoGfuQPtruHu8ajPQKyWiCLf+8noDRVLug70lIjF65y7SET/YrbbcySFKZvUzdaV
# hwofOFe785bhKyvWeOGJldo/zP5UsqEn4qYIoeHWyBUIttP9p2E25Dzym4mC0lG/
# n5p5a4x54m4kCi3ORa3kb/zhrAEv7RO3j1lSmnDQdw3mE3nHIPiIqnf163Jg2akg
# AyEBiQ==
# =szoO
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 30 Oct 2026 08:15:14 AM CDT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]
* tag 'pull-tcg-20261030' of https://gitlab.com/rth7680/qemu:
tcg/s390x: Implement INDEX_op_lea
tcg/riscv64: Implement INDEX_op_lea
tcg/aarch64: Implement INDEX_op_lea
tcg/loongarch64: Implement INDEX_op_lea
tcg/loongarch64: Import SLADD insns
tcg/x86_64: Implement INDEX_op_lea
tcg/x86_64: Introduce TCG_REG_NONE
target/i386: Use tcg_gen_lea_tl in gen_lea_modrm_1
target/s390x: Use tcg_gen_lea_i64 in get_address
target/riscv: Use tcg_gen_lea_tl for SH*ADD
target/mips: Use tcg_gen_lea() for [D]LSA and MXU S32LD*V opcodes
target/loongarch: Use tcg_gen_lea_tl for ALSL
target/alpha: Use tcg_gen_lea_i64 for S{4,8}ADD{L,Q}
tcg/optimize: Handle INDEX_op_lea
tcg: Add tcg_gen_lea_{i32,i64,tl}
tcg: Add INDEX_op_lea
accel/tcg: Do not flush and retry in place in tb_gen_code
accel/tcg: Fix false awakening of gdb
tcg: Adjust NONNULL annotation on *_diff functions
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Rather than hard-code -1, or compare < 0, use something
more descriptive. This also allows more use of TCGReg.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
While there's no actual shift, use the compound function
to add two registers and an immediate in one step.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
When the code buffer is full in a serial context, tb_gen_code() flushes
it and retries in place. cpu_exec_loop() then chains its last_tb, now
freed, into the new TB. When that TB is invalidated, tb_jmp_unlink()
follows the stale entry and qemu crashes inside its SIGSEGV handler.
Always queue the flush and leave through cpu_loop_exit(), as before
commit ebf7a5d294. This also brings back the cleanup in
cpu_loop_exit() and cpu_exec_longjmp_cleanup() that the retry skipped.
Since commit 25e5c6a320 ("accel/tcg: Allow cross-page goto_tb
chaining in user-only builds"), user-only builds hit this easily,
e.g. qemu-sparc64 -tb-size 1 on a program writing next to its PLT.
Cc: qemu-stable@nongnu.org
Fixes: ebf7a5d294 ("accel/tcg: Improve buffer overflow in tb_gen_code")
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Stian Halseth <stian@itx.no>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>