qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/3] scsi-block: VPD Block Limits emulation implementation
@ 2018-06-08 20:07 Daniel Henrique Barboza
  2018-06-08 20:07 ` [Qemu-devel] [PATCH v1 1/3] scsi-block: emulate missing Block Limits response Daniel Henrique Barboza
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Henrique Barboza @ 2018-06-08 20:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, famz, Daniel Henrique Barboza

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. First patch has more
details on the problem and why the existing workarounds are not enough,
including the first step towards the solution. Patch 2 wraps it up
and solves it. Patch 3 is a sort of 'cleanup' patch to isolate the
logic, avoiding tampering with the communication of SCSI hardware
that does implement the Block Limits message.


Daniel Henrique Barboza (3):
  scsi-block: emulate missing Block Limits response
  scsi-block: add VPD Block Limits in INQUIRY Supported Pages reply
  scsi-block: adding flag at realize to enable Block Limits emulation

 hw/scsi/scsi-disk.c    |  51 +++++++++++++++-
 hw/scsi/scsi-generic.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++---
 include/hw/scsi/scsi.h |   4 ++
 3 files changed, 201 insertions(+), 11 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-21 22:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08 20:07 [Qemu-devel] [PATCH v1 0/3] scsi-block: VPD Block Limits emulation implementation Daniel Henrique Barboza
2018-06-08 20:07 ` [Qemu-devel] [PATCH v1 1/3] scsi-block: emulate missing Block Limits response Daniel Henrique Barboza
2018-06-21 10:01   ` Paolo Bonzini
2018-06-08 20:07 ` [Qemu-devel] [PATCH v1 2/3] scsi-block: add VPD Block Limits in INQUIRY Supported Pages reply Daniel Henrique Barboza
2018-06-08 20:07 ` [Qemu-devel] [PATCH v1 3/3] scsi-block: adding flag at realize to enable Block Limits emulation Daniel Henrique Barboza
2018-06-21 10:01   ` Paolo Bonzini
2018-06-21 22:00     ` Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).