Skip to content

AHCI device fixes

John Snow qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v16 patches 16 repliesApplied

Changes in v2 from the cover letter

- Reset io_buffer_offset to 0 at the beginning of ide_exec_cmd, which will reset it for PIO I/O and all ATAPI commands. There was an oversight in V1 where we would use junk values for PACKET IDENTIFY if it was not the first command.

- Adjust the prepare_buf() callback to return, simply, the number of bytes it was able to prepare, or -1 on error. This resolves an ambiguity around the nature of its return code meaning "no sectors" or "no bytes" which led to bad error pathways.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3ide: repair PIO transfers for cases where nsector > 1hw/ide/ahci.c hw/ide/core.c+5 -10 replies
2/3ahci: unify sglist preparationhw/ide/ahci.c+2 -20 replies
3/3ide: Correct handling of malformed/short PRDTshw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +2 more+67 -210 replies

Reviews trailers per patch

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

PatchPaolo Bonzini
SeriesR-b
1/3
2/3
3/3

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] [block PATCH v2 0/3] AHCI device fixes

This is a v2 patch series that collects patches 3, 4 and 5 from the v1 series that was only partially merged.

This series, as a subset, generally cleans up the usage and handling of the scatter-gather list implementation in QEMU that interacts with the PRDT (Physical Region Descriptor Table) in AHCI.

We also repair a small oversight with PIO transfers.

This series currently applies cleanly to stefanha's block staging tree, but can be trivially merged to master.

v2:
- Reset io_buffer_offset to 0 at the beginning of ide_exec_cmd, which will reset it for PIO I/O and all ATAPI commands. There was an oversight in V1 where we would use junk values for PACKET IDENTIFY if it was not the first command.

- Adjust the prepare_buf() callback to return, simply, the number of bytes it was able to prepare, or -1 on error. This resolves an ambiguity around the nature of its return code meaning "no sectors" or "no bytes" which led to bad error pathways.

John Snow (3):
ide: repair PIO transfers for cases where nsector > 1
ahci: unify sglist preparation
ide: Correct handling of malformed/short PRDTs

 hw/ide/ahci.c     | 33 ++++++++++++++++++++++++++-------
 hw/ide/core.c     | 14 ++++++++++++--
 hw/ide/internal.h | 13 +++++++------
 hw/ide/macio.c    |  7 ++++++-
 hw/ide/pci.c      | 27 +++++++++++++++++++++------
 5 files changed, 72 insertions(+), 22 deletions(-)
Signature · 1 line
1.9.3