qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeuk Kim <jeuk20.kim@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org
Cc: "Jeuk Kim" <jeuk20.kim@samsung.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	qemu-block@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>, "Fam Zheng" <fam@euphon.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PULL 4/5] hw/ufs: Support for UFS logical unit
Date: Fri, 15 Sep 2023 07:19:18 +0900	[thread overview]
Message-ID: <160581dc-bdbc-03e8-64a5-1adb818a15b2@gmail.com> (raw)
In-Reply-To: <c4dc2292-4690-f16f-4b70-d6f759c16633@redhat.com>


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	other threads:[~2023-09-14 22:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 18:16 [PULL 0/5] Block patches Stefan Hajnoczi
2023-09-07 18:16 ` [PULL 1/5] iothread: Set the GSource "name" field Stefan Hajnoczi
2023-09-07 18:16 ` [PULL 2/5] hw/ufs: Initial commit for emulated Universal-Flash-Storage Stefan Hajnoczi
2023-09-07 18:16 ` [PULL 3/5] hw/ufs: Support for Query Transfer Requests Stefan Hajnoczi
2023-09-14 14:40   ` Peter Maydell
2023-09-14 22:28     ` Jeuk Kim
2023-09-07 18:16 ` [PULL 4/5] hw/ufs: Support for UFS logical unit Stefan Hajnoczi
2023-09-14 14:27   ` Peter Maydell
2023-09-14 14:47   ` Peter Maydell
2023-09-14 17:31   ` Paolo Bonzini
2023-09-14 22:19     ` Jeuk Kim [this message]
2023-09-15  7:59       ` Paolo Bonzini
2023-09-18  4:41         ` Jeuk Kim
2023-09-18  4:52           ` Jeuk Kim
2023-09-21  8:38         ` Jeuk Kim
2023-10-04  1:18           ` Ping: " Jeuk Kim
2023-09-07 18:16 ` [PULL 5/5] tests/qtest: Introduce tests for UFS Stefan Hajnoczi
2023-09-08 15:55 ` [PULL 0/5] Block patches Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160581dc-bdbc-03e8-64a5-1adb818a15b2@gmail.com \
    --to=jeuk20.kim@gmail.com \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=jeuk20.kim@samsung.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).