All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
       [not found] <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1>
@ 2023-08-07  1:37 ` Jeuk Kim
  2023-08-07  6:01   ` Adrian Hunter
                     ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jeuk Kim @ 2023-08-07  1:37 UTC (permalink / raw)
  To: jejb, martin.petersen, adrian.hunter, bvanassche, Jeuk Kim, avri.altman
  Cc: linux-scsi, linux-kernel

To ensure that the pci based QEMU ufs device properly works with linux,
register the device id (0x0013) and vendor id (0x1b36) of QEMU ufs device.

QEMU UFS will enable testing of the UFS driver inside a virtual machine
on systems without UFS host controller. It can also be used to preemptively
implement and test new features before the real device is created.

The new qemu ufs device can be found at
https://lore.kernel.org/qemu-devel/20230727155239.GA979354@fedora

Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
---

Since v1:
- Based on Adrian's comment, I modified the commit message to be
  more detailed.

---
 drivers/ufs/host/ufshcd-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
index cf3987773051..29d322931427 100644
--- a/drivers/ufs/host/ufshcd-pci.c
+++ b/drivers/ufs/host/ufshcd-pci.c
@@ -590,6 +590,7 @@ static const struct dev_pm_ops ufshcd_pci_pm_ops = {
 };
 
 static const struct pci_device_id ufshcd_pci_tbl[] = {
+	{ PCI_VENDOR_ID_REDHAT, 0x0013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VDEVICE(INTEL, 0x9DFA), (kernel_ulong_t)&ufs_intel_cnl_hba_vops },
 	{ PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
-- 
2.34.1

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

* Re: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
  2023-08-07  1:37 ` [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Jeuk Kim
@ 2023-08-07  6:01   ` Adrian Hunter
  2023-08-07 21:04   ` Bart Van Assche
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2023-08-07  6:01 UTC (permalink / raw)
  To: jeuk20.kim, jejb, martin.petersen, bvanassche, avri.altman
  Cc: linux-scsi, linux-kernel

On 7/08/23 04:37, Jeuk Kim wrote:
> To ensure that the pci based QEMU ufs device properly works with linux,
> register the device id (0x0013) and vendor id (0x1b36) of QEMU ufs device.
> 
> QEMU UFS will enable testing of the UFS driver inside a virtual machine
> on systems without UFS host controller. It can also be used to preemptively
> implement and test new features before the real device is created.
> 
> The new qemu ufs device can be found at
> https://lore.kernel.org/qemu-devel/20230727155239.GA979354@fedora
> 
> Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Thank you!

> ---
> 
> Since v1:
> - Based on Adrian's comment, I modified the commit message to be
>   more detailed.
> 
> ---
>  drivers/ufs/host/ufshcd-pci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
> index cf3987773051..29d322931427 100644
> --- a/drivers/ufs/host/ufshcd-pci.c
> +++ b/drivers/ufs/host/ufshcd-pci.c
> @@ -590,6 +590,7 @@ static const struct dev_pm_ops ufshcd_pci_pm_ops = {
>  };
>  
>  static const struct pci_device_id ufshcd_pci_tbl[] = {
> +	{ PCI_VENDOR_ID_REDHAT, 0x0013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>  	{ PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>  	{ PCI_VDEVICE(INTEL, 0x9DFA), (kernel_ulong_t)&ufs_intel_cnl_hba_vops },
>  	{ PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },


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

* Re: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
  2023-08-07  1:37 ` [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Jeuk Kim
  2023-08-07  6:01   ` Adrian Hunter
@ 2023-08-07 21:04   ` Bart Van Assche
       [not found]   ` <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p3>
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2023-08-07 21:04 UTC (permalink / raw)
  To: jeuk20.kim, jejb, martin.petersen, adrian.hunter, avri.altman
  Cc: linux-scsi, linux-kernel

On 8/6/23 18:37, Jeuk Kim wrote:
>   static const struct pci_device_id ufshcd_pci_tbl[] = {
> +	{ PCI_VENDOR_ID_REDHAT, 0x0013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>   	{ PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },

Does Red Hat agree with using device ID 0x0013 for this purpose? Is it 
guaranteed that this device ID won't be used for any other purpose?

Thanks,

Bart.


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

* Re: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
       [not found]   ` <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p3>
@ 2023-08-08  1:01     ` Jeuk Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Jeuk Kim @ 2023-08-08  1:01 UTC (permalink / raw)
  To: Bart Van Assche, jejb, martin.petersen, adrian.hunter, avri.altman
  Cc: linux-scsi, linux-kernel

On 8/8/23, Bart Van Assche wrote:
> On 8/6/23 18:37, Jeuk Kim wrote:
>>   static const struct pci_device_id ufshcd_pci_tbl[] = {
>> +	{ PCI_VENDOR_ID_REDHAT, 0x0013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>>   	{ PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> 
> Does Red Hat agree with using device ID 0x0013 for this purpose? Is it 
> guaranteed that this device ID won't be used for any other purpose?
> 
> Thanks,
> 
> Bart.

Yes. 
Red Hat donated part of its device ID range to QEMU, which is 1b36:0001 to 1b36:00ff,
and the QEMU community has accepted UFS to use device ID 1b36:0x0013.

The document can be found at https://www.qemu.org/docs/master/specs/pci-ids.html.
As qemu.git/master is frozen for the next release, you cannot see the QEMU UFS device ID on the page now.
You will be able to see it after about 22 August.

Thanks,
Jeuk

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

* Re: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
  2023-08-07  1:37 ` [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Jeuk Kim
                     ` (2 preceding siblings ...)
       [not found]   ` <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p3>
@ 2023-08-08  2:39   ` Martin K. Petersen
  2023-08-21 22:27   ` Martin K. Petersen
  4 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2023-08-08  2:39 UTC (permalink / raw)
  To: Jeuk Kim
  Cc: jejb, martin.petersen, adrian.hunter, bvanassche, avri.altman,
	linux-scsi, linux-kernel


Jeuk,

> To ensure that the pci based QEMU ufs device properly works with
> linux, register the device id (0x0013) and vendor id (0x1b36) of QEMU
> ufs device.

Applied to 6.6/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU
  2023-08-07  1:37 ` [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Jeuk Kim
                     ` (3 preceding siblings ...)
  2023-08-08  2:39   ` Martin K. Petersen
@ 2023-08-21 22:27   ` Martin K. Petersen
  4 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2023-08-21 22:27 UTC (permalink / raw)
  To: jejb, adrian.hunter, bvanassche, avri.altman, Jeuk Kim
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Mon, 07 Aug 2023 10:37:26 +0900, Jeuk Kim wrote:

> To ensure that the pci based QEMU ufs device properly works with linux,
> register the device id (0x0013) and vendor id (0x1b36) of QEMU ufs device.
> 
> QEMU UFS will enable testing of the UFS driver inside a virtual machine
> on systems without UFS host controller. It can also be used to preemptively
> implement and test new features before the real device is created.
> 
> [...]

Applied to 6.6/scsi-queue, thanks!

[1/1] scsi: ufs: ufs-pci: Add support for QEMU
      https://git.kernel.org/mkp/scsi/c/a18e81d17a7e

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2023-08-21 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1>
2023-08-07  1:37 ` [PATCH v2] scsi: ufs: ufs-pci: Add support for QEMU Jeuk Kim
2023-08-07  6:01   ` Adrian Hunter
2023-08-07 21:04   ` Bart Van Assche
     [not found]   ` <CGME20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p3>
2023-08-08  1:01     ` Jeuk Kim
2023-08-08  2:39   ` Martin K. Petersen
2023-08-21 22:27   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.