Skip to content

aspeed: Improve error handling and fix DMA issues

Cédric Le Goater qemu-arm qemu-devel 2 versions – Applied

Status from this message: Applied to aspeed-next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- v1 was taking into account patch :
https://lore.kernel.org/all/[email protected]
Rebased on upstream

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3hw/ssi/aspeed_smc: Convert mem ops to read/write_with_attrs for error handlinghw/ssi/aspeed_smc.c+28 -210 replies
2/3ftgmac100: Improve DMA error handlinghw/net/ftgmac100.c+8 -22 replies
3/3hw/i2c/aspeed_i2c: Remove asserthw/i2c/aspeed_i2c.c+0 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJamin LinPhilippe Mathieu-Daudé
1/3R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] aspeed: Improve error handling and fix DMA issues

Hello,

This series addresses several error handling issues in Aspeed device models that could lead to guest-triggerable denial of service or incorrect behavior.

The first two patches improve DMA error handling by properly propagating memory transaction errors to the guest. The aspeed_smc patch converts memory operations to use read/write_with_attrs to return MEMTX_ERROR on invalid conditions, while the ftgmac100 patch checks DMA operation return values.

The third patch fixes an incorrect assertion in the aspeed_i2c model that could be triggered when firmware uses the RX_BUF_LEN_W1T bit to program DMA length fields separately, which is valid per the Aspeed datasheet.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3335
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3315

Thanks,

C.

Changes in v2:

- v1 was taking into account patch :
https://lore.kernel.org/all/[email protected]
Rebased on upstream

Cédric Le Goater (3):
hw/ssi/aspeed_smc: Convert mem ops to read/write_with_attrs for error
handling
ftgmac100: Improve DMA error handling
hw/i2c/aspeed_i2c: Remove assert

 hw/i2c/aspeed_i2c.c |  1 -
 hw/net/ftgmac100.c  | 10 +++++++--
 hw/ssi/aspeed_smc.c | 49 ++++++++++++++++++++++++++-------------------
 3 files changed, 36 insertions(+), 24 deletions(-)
Signature · 1 line
2.53.0