Skip to content

AHCI: avoid mapping stale guest memory

John Snow qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- ahci_map_[clb|fis]_address now returns true on success
- PORT_CMD_LIST_ON and PORT_CMD_FIS_ON only turn on if the map succeeds
- Fix compiler warning due to changing context.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2AHCI: Do not (re)map FB/CLB buffers while not runninghw/ide/ahci.c+33 -170 replies
2/2AHCI: Protect cmd registerhw/ide/ahci.c hw/ide/ahci.h+27 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Hajnoczi
SeriesR-b
1/2
2/2

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

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/2] AHCI: avoid mapping stale guest memory

Currently, the AHCI device tries to re-map guest memory every time the low or high address registers are written to, whether or not the AHCI device is currently active. If the other register has stale information in it, this may lead to runtime failures.

Reconfigure the AHCI device to ignore writes to these registers while the device is active, and otherwise postpone the dma memory map until the device becomes active.

If the mappings should for whatever reason fail, do not activate the bits that tell the user the device has been started successfully.

v2:
- ahci_map_[clb|fis]_address now returns true on success
- PORT_CMD_LIST_ON and PORT_CMD_FIS_ON only turn on if the map succeeds
- Fix compiler warning due to changing context.

John Snow (2):
AHCI: Do not (re)map FB/CLB buffers while not running
AHCI: Protect cmd register

 hw/ide/ahci.c | 76 +++++++++++++++++++++++++++++++++++++++++++++--------------
 hw/ide/ahci.h |  2 ++
 2 files changed, 60 insertions(+), 18 deletions(-)
Signature · 1 line
1.9.3