<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/include/hw/scsi, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/include/hw/scsi?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/include/hw/scsi?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-10-22T21:21:16+00:00</updated>
<entry>
<title>include/hw/scsi/scsi.h: Remove unused scsi_legacy_handle_cmdline() prototype</title>
<updated>2022-10-22T21:21:16+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2022-10-13T13:05:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fe8a7390c10c78b806211d7e36727c461d39a17f'/>
<id>urn:sha1:fe8a7390c10c78b806211d7e36727c461d39a17f</id>
<content type='text'>
In commit 1454509726719e0933c80 we removed the function
scsi_legacy_handle_cmdline() and all of its callers, but forgot to
delete the prototype from the header function.  Delete the prototype
too.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Message-Id: &lt;20221013130500.967432-1-peter.maydell@linaro.org&gt;
Signed-off-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
</content>
</entry>
<entry>
<title>virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events</title>
<updated>2022-10-13T21:38:33+00:00</updated>
<author>
<name>Venu Busireddy</name>
</author>
<published>2022-10-06T19:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8cc5583abe6419e7faaebc9fbd109f34f4c850f2'/>
<id>urn:sha1:8cc5583abe6419e7faaebc9fbd109f34f4c850f2</id>
<content type='text'>
Section 5.6.6.3 of VirtIO specification states, "Events will also
be reported via sense codes..." However, no sense data is sent when
VIRTIO_SCSI_EVT_RESET_RESCAN or VIRTIO_SCSI_EVT_RESET_REMOVED events
are reported (when disk hotplug/hotunplug events occur). SCSI layer
on Solaris depends on this sense data, and hence does not handle disk
hotplug/hotunplug events.

When the disk inventory changes, use the bus unit attention mechanism
to return a CHECK_CONDITION status with sense data of 0x06/0x3F/0x0E
(sense code REPORTED_LUNS_CHANGED).  The first device on the bus to
execute a command successfully will report and consume the unit
attention status.

Signed-off-by: Venu Busireddy &lt;venu.busireddy@oracle.com&gt;
Message-Id: &lt;20221006194946.24134-1-venu.busireddy@oracle.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi: Add buf_len parameter to scsi_req_new()</title>
<updated>2022-09-01T05:42:37+00:00</updated>
<author>
<name>John Millikin</name>
</author>
<published>2022-08-17T05:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fe9d8927e265fd723a6dc87cd6d220f4677dbe1f'/>
<id>urn:sha1:fe9d8927e265fd723a6dc87cd6d220f4677dbe1f</id>
<content type='text'>
When a SCSI command is received from the guest, the CDB length implied
by the first byte might exceed the number of bytes the guest sent. In
this case scsi_req_new() will read uninitialized data, causing
unpredictable behavior.

Adds the buf_len parameter to scsi_req_new() and plumbs it through the
call stack.

Signed-off-by: John Millikin &lt;john@john-millikin.com&gt;
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1127
Message-Id: &lt;20220817053458.698416-1-john@john-millikin.com&gt;
[Fill in correct length for adapters other than ESP. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_TRUNCATED quirk for Macintosh</title>
<updated>2022-07-13T14:58:58+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=389e18eb9aa4877f33326afa426643769185d014'/>
<id>urn:sha1:389e18eb9aa4877f33326afa426643769185d014</id>
<content type='text'>
When A/UX configures the CDROM device it sends a truncated MODE SELECT request
for page 1 (MODE_PAGE_R_W_ERROR) which is only 6 bytes in length rather than
10. This seems to be due to bug in Apple's code which calculates the CDB message
length incorrectly.

The work at [1] suggests that this truncated request is accepted on real
hardware whereas in QEMU it generates an INVALID_PARAM_LEN sense code which
causes A/UX to get stuck in a loop retrying the command in an attempt to succeed.

Alter the mode page request length check so that truncated requests are allowed
if the SCSI_DISK_QUIRK_MODE_PAGE_TRUNCATED quirk is enabled, whilst also adding a
trace event to enable the condition to be detected.

[1] https://68kmla.org/bb/index.php?threads/scsi2sd-project-anyone-interested.29040/page-7#post-316444

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Message-Id: &lt;20220622105314.802852-10-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk for Macintosh</title>
<updated>2022-07-13T14:58:58+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=09274de1f70e0773b95f865ef4980599e51aa67d'/>
<id>urn:sha1:09274de1f70e0773b95f865ef4980599e51aa67d</id>
<content type='text'>
Both MacOS and A/UX make use of vendor-specific MODE SELECT commands with PF=0
to identify SCSI devices:

- MacOS sends a MODE SELECT command with PF=0 for the MODE_PAGE_VENDOR_SPECIFIC
  (0x0) mode page containing 2 bytes before initialising a disk

- A/UX (installed on disk) sends a MODE SELECT command with PF=0 during SCSI
  bus enumeration, and gets stuck in an infinite loop if it fails

Add a new SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk to allow both
PF=0 MODE SELECT commands and implement a MODE_PAGE_VENDOR_SPECIFIC (0x0)
mode page which is compatible with MacOS.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Message-Id: &lt;20220622105314.802852-7-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-disk: add SCSI_DISK_QUIRK_MODE_SENSE_ROM_USE_DBD quirk for Macintosh</title>
<updated>2022-07-13T14:58:57+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f43c2b94cd1764ba0a47fc1f848681b0e89d4892'/>
<id>urn:sha1:f43c2b94cd1764ba0a47fc1f848681b0e89d4892</id>
<content type='text'>
During SCSI bus enumeration A/UX sends a MODE SENSE command to the CDROM with
the DBD bit unset and expects the response to include a block descriptor. As per
the latest SCSI documentation, QEMU currently force-disables the block
descriptor for CDROM devices but the A/UX driver expects the requested block
descriptor to be returned.

If the block descriptor is not returned in the response then A/UX becomes
confused, since the block descriptor returned in the MODE SENSE response is
used to generate a subsequent MODE SELECT command which is then invalid.

Add a new SCSI_DISK_QUIRK_MODE_SENSE_ROM_USE_DBD quirk to allow this behaviour
to be enabled as required. Note that an additional workaround is required for
the previous SCSI_DISK_QUIRK_MODE_PAGE_APPLE_VENDOR quirk which must never
return a block descriptor even though the DBD bit is left unset.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Message-Id: &lt;20220622105314.802852-5-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi-disk: add MODE_PAGE_APPLE_VENDOR quirk for Macintosh</title>
<updated>2022-07-13T14:58:57+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-06-22T10:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=09d37867627a86f23248c138f380bd38bada4073'/>
<id>urn:sha1:09d37867627a86f23248c138f380bd38bada4073</id>
<content type='text'>
One of the mechanisms MacOS uses to identify CDROM drives compatible with MacOS
is to send a custom MODE SELECT command for page 0x30 to the drive. The
response to this is a hard-coded manufacturer string which must match in order
for the CDROM to be usable within MacOS.

Add an implementation of the MODE SELECT page 0x30 response guarded by a newly
defined SCSI_DISK_QUIRK_MODE_PAGE_APPLE_VENDOR quirk bit so that CDROM drives
attached to non-Apple machines function exactly as before.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
Message-Id: &lt;20220622105314.802852-3-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>esp: convert ESPState pdma_cb from a function pointer to an integer</title>
<updated>2022-03-09T09:29:10+00:00</updated>
<author>
<name>Mark Cave-Ayland</name>
</author>
<published>2022-03-05T15:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=77987ef5a3458c24211d2766164acffc160bfc33'/>
<id>urn:sha1:77987ef5a3458c24211d2766164acffc160bfc33</id>
<content type='text'>
This prepares for the inclusion of the current PDMA callback in the migration
stream since the callback is referenced by an integer instead of a function
pointer.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
Message-Id: &lt;20220305155530.9265-9-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
</content>
</entry>
<entry>
<title>hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult</title>
<updated>2022-01-18T11:56:29+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-12-16T08:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f02b664aad8f1aaafbcdf45285f6fcab0a4bd5d0'/>
<id>urn:sha1:f02b664aad8f1aaafbcdf45285f6fcab0a4bd5d0</id>
<content type='text'>
Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type.
Do not discard it, return it to the caller. Pass the previously
returned value (the QEMUSGList residual size, which was rarely used)
as an optional argument.

With this new API, SCSIRequest::residual might now be accessed via
a pointer. Since the size_t type does not have the same size on
32 and 64-bit host architectures, convert it to a uint64_t, which
is big enough to hold the residual size, and the type is constant
on both 32/64-bit hosts.

Update the few dma_buf_read() / dma_buf_write() callers to the new
API.

Reviewed-by: Klaus Jensen &lt;k.jensen@samsung.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Acked-by: Peter Xu &lt;peterx@redhat.com&gt;
Message-Id: &lt;20220117125130.131828-1-f4bug@amsat.org&gt;
</content>
</entry>
<entry>
<title>hw/scsi: Rename SCSIRequest::resid as 'residual'</title>
<updated>2022-01-18T11:56:29+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-12-31T10:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5f412602ded57bbdce614685eba915f6042dda1d'/>
<id>urn:sha1:5f412602ded57bbdce614685eba915f6042dda1d</id>
<content type='text'>
The 'resid' field is slightly confusing and could be
interpreted as some ID. Rename it as 'residual' which
is clearer to review. No logical change.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Message-Id: &lt;20220111184309.28637-8-f4bug@amsat.org&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
</content>
</entry>
</feed>
