qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit


From: Jeuk Kim
Subject: Re: [PULL 4/5] hw/ufs: Support for UFS logical unit
Date: Fri, 15 Sep 2023 07:19:18 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0


On 23. 9. 15. 02:31, Paolo Bonzini wrote:
On 9/7/23 20:16, Stefan Hajnoczi wrote:
From: Jeuk Kim<jeuk20.kim@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.kim@samsung.com>
Reviewed-by: Stefan Hajnoczi<stefanha@redhat.com>
Message-id:beacc504376ab6a14b1a3830bb3c69382cf6aebc.1693980783.git.jeuk20.kim@gmail.com
Signed-off-by: Stefan Hajnoczi<stefanha@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

[Prev in Thread] Current Thread [Next in Thread]