Skip to content

VPD Block Limits emulation implementation

Daniel Henrique Barboza qemu-devel 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyApplied
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- series overhauled - first 2 patches are cleanups (split in 2 for easier review), patch 3 contains the whole logic
- previous version link:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02289.html

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3hw/scsi: cleanups before VPD BL emulationhw/scsi/scsi-disk.c hw/scsi/scsi-generic.c include/hw/scsi/scsi.h+249 -2300 replies
2/3hw/scsi: centralize SG_IO calls into single functionhw/scsi/scsi-disk.c hw/scsi/scsi-generic.c include/hw/scsi/scsi.h+36 -450 replies
3/3hw/scsi: add VPD Block Limits emulationhw/scsi/scsi-disk.c hw/scsi/scsi-generic.c include/hw/scsi/scsi.h+125 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] VPD Block Limits emulation implementation

v2:
- series overhauled - first 2 patches are cleanups (split in 2 for easier review), patch 3 contains the whole logic
- previous version link:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02289.html

When using SCSI passthrough and running in Linux, QEMU edits the reply of the SCSI Inquiry VPD Block Limits message with the value of the /sys/bus/<dev>/queue/max_sectors_kb parameter the device has in the host. Doing so allows the Linux guest to proper setup the device.

But the Block Limits message is optional, and its absence can cause the device to be unusable by the guest. An example can be seen at https://bugzilla.redhat.com/show_bug.cgi?id=1566195.

This series implements an approach to solve it.

Daniel Henrique Barboza (3):
hw/scsi: cleanups before VPD BL emulation hw/scsi: centralize SG_IO calls into single function hw/scsi: add VPD Block Limits emulation

 hw/scsi/scsi-disk.c    | 427 +++++++++++++++++++++--------------------
 hw/scsi/scsi-generic.c | 246 ++++++++++++++++++------
 include/hw/scsi/scsi.h |   6 +-
 3 files changed, 401 insertions(+), 278 deletions(-)
Signature · 1 line
2.17.1