On 23. 9. 15. 02:31, Paolo Bonzini wrote:
On 9/7/23 20:16, Stefan Hajnoczi wrote:
From: Jeuk Kim<jeuk20....@samsung.com>

This commit adds support for ufs logical unit.
The LU handles processing for the SCSI command,
unit descriptor query request.

This commit enables the UFS device to process
IO requests.

Signed-off-by: Jeuk Kim<jeuk20....@samsung.com>
Reviewed-by: Stefan Hajnoczi<stefa...@redhat.com>
Message-id:beacc504376ab6a14b1a3830bb3c69382cf6aebc.1693980783.git.jeuk20....@gmail.com
Signed-off-by: Stefan Hajnoczi<stefa...@redhat.com>
---

Jeuk,

can you explain the differences between scsi-hd and ufs-lu, apart from the different bus type?  Ideally, the UFS controller would be in hw/scsi/ufs.c and there would be no need for ufs-lu at all.

Would it make sense to allow any SCSI device into a UFS bus without the need to have duplicate code?

Thanks!

Paolo



Hi Paolo,


While ufs does use the SCSI specification to communicate with the driver,

it doesn't behave exactly like a typical scsi device.


First, ufs-lu has a feature called "unit descriptor". This feature shows the status of the ufs-lu

and only works with UFS-specific "query request" commands, not SCSI commands.


UFS also has something called a well-known lu. Unlike typical SCSI devices, where each lu is independent,

UFS can control other lu's through the well-known lu.


Finally, UFS-LU will have features that SCSI-HD does not have, such as the zone block command.


In addition to this, I wanted some scsi commands to behave differently from scsi-hd, for example,

the Inquiry command should read "QEMU UFS" instead of "QEMU HARDDISK",

and the mode_sense_page command should have a different result.


For these reasons, I chose to generate the ufs-lu code separately.


Please let me know if you have any comments on this.


Thanks!

Jeuk


Reply via email to