DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/2] Add a few new DSA/IAX device IDs
@ 2024-08-28 22:42 Fenghua Yu
  2024-08-28 22:42 ` [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform Fenghua Yu
  2024-08-28 22:42 ` [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform Fenghua Yu
  0 siblings, 2 replies; 7+ messages in thread
From: Fenghua Yu @ 2024-08-28 22:42 UTC (permalink / raw)
  To: Vinod Koul, Dave Jiang; +Cc: dmaengine, linux-kernel, Fenghua Yu

Due to a potential security issue, it's not safe to assign legacy
DSA/IAA devices to virtual machines. This issue has been addressed
by adding the legacy DSA/IAA device IDs to the VFIO denylist[1].

With the security issue fixed in newer DSA/IAA devices, which have
new device IDs, these devices can be safely assigned to virtual
machines without needing to add their IDs to the VFIOI denylist.
Additionally, the new device IDs may be useful to identify any other
potential issues with specific device as well in the future.

[1] commit 95feb3160eef ("VFIO: Add the SPR_DSA and SPR_IAX devices to
    the denylist")

Fenghua Yu (2):
  dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform
  dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids
    platform

 drivers/dma/idxd/init.c | 6 ++++++
 include/linux/pci_ids.h | 3 +++
 2 files changed, 9 insertions(+)

-- 
2.37.1


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

* [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform
  2024-08-28 22:42 [PATCH 0/2] Add a few new DSA/IAX device IDs Fenghua Yu
@ 2024-08-28 22:42 ` Fenghua Yu
  2024-08-28 22:46   ` Dave Jiang
  2024-08-28 22:42 ` [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform Fenghua Yu
  1 sibling, 1 reply; 7+ messages in thread
From: Fenghua Yu @ 2024-08-28 22:42 UTC (permalink / raw)
  To: Vinod Koul, Dave Jiang; +Cc: dmaengine, linux-kernel, Fenghua Yu

A new DSA device ID, 0x11fb, is introduced on the Granite Rapids-D
platform. Add the device ID to the IDXD driver.

Since a potential security issue has been fixed on the new device, it's
secure to assign the device to virtual machines, and therefore, the new
device ID will not be added to the VFIO denylist. Additionally, the new
device ID may be useful in identifying and addressing any other potential
issues with this specific device in the future. The same is also applied
to any other new DSA/IAA devices with new device IDs.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 drivers/dma/idxd/init.c | 2 ++
 include/linux/pci_ids.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index 21f6905b554d..415b17b0acd0 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -69,6 +69,8 @@ static struct idxd_driver_data idxd_driver_data[] = {
 static struct pci_device_id idxd_pci_tbl[] = {
 	/* DSA ver 1.0 platforms */
 	{ PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
+	/* DSA on GNR-D platforms */
+	{ PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
 
 	/* IAX ver 1.0 platforms */
 	{ PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e388c8b1cbc2..ff99047dac44 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2706,6 +2706,7 @@
 #define PCI_DEVICE_ID_INTEL_82815_MC	0x1130
 #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
 #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
+#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
 #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
 #define PCI_DEVICE_ID_INTEL_82437	0x122d
 #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e
-- 
2.37.1


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

* [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform
  2024-08-28 22:42 [PATCH 0/2] Add a few new DSA/IAX device IDs Fenghua Yu
  2024-08-28 22:42 ` [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform Fenghua Yu
@ 2024-08-28 22:42 ` Fenghua Yu
  2024-08-28 22:45   ` Dave Jiang
  1 sibling, 1 reply; 7+ messages in thread
From: Fenghua Yu @ 2024-08-28 22:42 UTC (permalink / raw)
  To: Vinod Koul, Dave Jiang; +Cc: dmaengine, linux-kernel, Fenghua Yu

A new DSA device ID, 0x1212, and a new IAA device ID, 0x1216, are
introduced on Diamond Rapids platform. Add the device IDs to the IDXD
driver.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 drivers/dma/idxd/init.c | 4 ++++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index 415b17b0acd0..21e3cff66f77 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -71,9 +71,13 @@ static struct pci_device_id idxd_pci_tbl[] = {
 	{ PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
 	/* DSA on GNR-D platforms */
 	{ PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
+	/* DSA on DMR platforms */
+	{ PCI_DEVICE_DATA(INTEL, DSA_DMR, &idxd_driver_data[IDXD_TYPE_DSA]) },
 
 	/* IAX ver 1.0 platforms */
 	{ PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
+	/* IAX on DMR platforms */
+	{ PCI_DEVICE_DATA(INTEL, IAX_DMR, &idxd_driver_data[IDXD_TYPE_IAX]) },
 	{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ff99047dac44..e15ebb3942ae 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2707,6 +2707,8 @@
 #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
 #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
 #define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
+#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
+#define PCI_DEVICE_ID_INTEL_IAX_DMR	0x1216
 #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
 #define PCI_DEVICE_ID_INTEL_82437	0x122d
 #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e
-- 
2.37.1


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

* Re: [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform
  2024-08-28 22:42 ` [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform Fenghua Yu
@ 2024-08-28 22:45   ` Dave Jiang
  2024-08-28 23:07     ` Fenghua Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Jiang @ 2024-08-28 22:45 UTC (permalink / raw)
  To: Fenghua Yu, Vinod Koul; +Cc: dmaengine, linux-kernel



On 8/28/24 3:42 PM, Fenghua Yu wrote:
> A new DSA device ID, 0x1212, and a new IAA device ID, 0x1216, are
> introduced on Diamond Rapids platform. Add the device IDs to the IDXD
> driver.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
>  drivers/dma/idxd/init.c | 4 ++++
>  include/linux/pci_ids.h | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
> index 415b17b0acd0..21e3cff66f77 100644
> --- a/drivers/dma/idxd/init.c
> +++ b/drivers/dma/idxd/init.c
> @@ -71,9 +71,13 @@ static struct pci_device_id idxd_pci_tbl[] = {
>  	{ PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
>  	/* DSA on GNR-D platforms */
>  	{ PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
> +	/* DSA on DMR platforms */
> +	{ PCI_DEVICE_DATA(INTEL, DSA_DMR, &idxd_driver_data[IDXD_TYPE_DSA]) },
>  
>  	/* IAX ver 1.0 platforms */
>  	{ PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
> +	/* IAX on DMR platforms */
> +	{ PCI_DEVICE_DATA(INTEL, IAX_DMR, &idxd_driver_data[IDXD_TYPE_IAX]) },

IAA_DMR?

>  	{ 0, }
>  };
>  MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index ff99047dac44..e15ebb3942ae 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2707,6 +2707,8 @@
>  #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
>  #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
>  #define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
> +#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
> +#define PCI_DEVICE_ID_INTEL_IAX_DMR	0x1216

s/IAX/IAA/ ?

>  #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
>  #define PCI_DEVICE_ID_INTEL_82437	0x122d
>  #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e

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

* Re: [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform
  2024-08-28 22:42 ` [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform Fenghua Yu
@ 2024-08-28 22:46   ` Dave Jiang
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Jiang @ 2024-08-28 22:46 UTC (permalink / raw)
  To: Fenghua Yu, Vinod Koul; +Cc: dmaengine, linux-kernel



On 8/28/24 3:42 PM, Fenghua Yu wrote:
> A new DSA device ID, 0x11fb, is introduced on the Granite Rapids-D
> platform. Add the device ID to the IDXD driver.
> 
> Since a potential security issue has been fixed on the new device, it's
> secure to assign the device to virtual machines, and therefore, the new
> device ID will not be added to the VFIO denylist. Additionally, the new
> device ID may be useful in identifying and addressing any other potential
> issues with this specific device in the future. The same is also applied
> to any other new DSA/IAA devices with new device IDs.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  drivers/dma/idxd/init.c | 2 ++
>  include/linux/pci_ids.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
> index 21f6905b554d..415b17b0acd0 100644
> --- a/drivers/dma/idxd/init.c
> +++ b/drivers/dma/idxd/init.c
> @@ -69,6 +69,8 @@ static struct idxd_driver_data idxd_driver_data[] = {
>  static struct pci_device_id idxd_pci_tbl[] = {
>  	/* DSA ver 1.0 platforms */
>  	{ PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
> +	/* DSA on GNR-D platforms */
> +	{ PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
>  
>  	/* IAX ver 1.0 platforms */
>  	{ PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index e388c8b1cbc2..ff99047dac44 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2706,6 +2706,7 @@
>  #define PCI_DEVICE_ID_INTEL_82815_MC	0x1130
>  #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
>  #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
> +#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
>  #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
>  #define PCI_DEVICE_ID_INTEL_82437	0x122d
>  #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e

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

* Re: [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform
  2024-08-28 22:45   ` Dave Jiang
@ 2024-08-28 23:07     ` Fenghua Yu
  2024-08-28 23:08       ` Dave Jiang
  0 siblings, 1 reply; 7+ messages in thread
From: Fenghua Yu @ 2024-08-28 23:07 UTC (permalink / raw)
  To: Dave Jiang, Vinod Koul; +Cc: dmaengine, linux-kernel

Hi, Dave,

On 8/28/24 15:45, Dave Jiang wrote:
> 
> 
> On 8/28/24 3:42 PM, Fenghua Yu wrote:
>> A new DSA device ID, 0x1212, and a new IAA device ID, 0x1216, are
>> introduced on Diamond Rapids platform. Add the device IDs to the IDXD
>> driver.
>>
>> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
>> ---
>>   drivers/dma/idxd/init.c | 4 ++++
>>   include/linux/pci_ids.h | 2 ++
>>   2 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
>> index 415b17b0acd0..21e3cff66f77 100644
>> --- a/drivers/dma/idxd/init.c
>> +++ b/drivers/dma/idxd/init.c
>> @@ -71,9 +71,13 @@ static struct pci_device_id idxd_pci_tbl[] = {
>>   	{ PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
>>   	/* DSA on GNR-D platforms */
>>   	{ PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
>> +	/* DSA on DMR platforms */
>> +	{ PCI_DEVICE_DATA(INTEL, DSA_DMR, &idxd_driver_data[IDXD_TYPE_DSA]) },
>>   
>>   	/* IAX ver 1.0 platforms */
>>   	{ PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
>> +	/* IAX on DMR platforms */
>> +	{ PCI_DEVICE_DATA(INTEL, IAX_DMR, &idxd_driver_data[IDXD_TYPE_IAX]) },
> 
> IAA_DMR?

Sure. Will fix this.

Also add something in the commit message? "Use IAA in new code instead 
of old name IAX. The IAX name (e.g. IDXD_TYPE_IAX) is still kept in 
legacy code"

> 
>>   	{ 0, }
>>   };
>>   MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);
>> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
>> index ff99047dac44..e15ebb3942ae 100644
>> --- a/include/linux/pci_ids.h
>> +++ b/include/linux/pci_ids.h
>> @@ -2707,6 +2707,8 @@
>>   #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
>>   #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
>>   #define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
>> +#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
>> +#define PCI_DEVICE_ID_INTEL_IAX_DMR	0x1216
> 
> s/IAX/IAA/ ?

Ditto.

> 
>>   #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
>>   #define PCI_DEVICE_ID_INTEL_82437	0x122d
>>   #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e

Thanks.

-Fenghua

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

* Re: [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform
  2024-08-28 23:07     ` Fenghua Yu
@ 2024-08-28 23:08       ` Dave Jiang
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Jiang @ 2024-08-28 23:08 UTC (permalink / raw)
  To: Fenghua Yu, Vinod Koul; +Cc: dmaengine, linux-kernel



On 8/28/24 4:07 PM, Fenghua Yu wrote:
> Hi, Dave,
> 
> On 8/28/24 15:45, Dave Jiang wrote:
>>
>>
>> On 8/28/24 3:42 PM, Fenghua Yu wrote:
>>> A new DSA device ID, 0x1212, and a new IAA device ID, 0x1216, are
>>> introduced on Diamond Rapids platform. Add the device IDs to the IDXD
>>> driver.
>>>
>>> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
>>> ---
>>>   drivers/dma/idxd/init.c | 4 ++++
>>>   include/linux/pci_ids.h | 2 ++
>>>   2 files changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
>>> index 415b17b0acd0..21e3cff66f77 100644
>>> --- a/drivers/dma/idxd/init.c
>>> +++ b/drivers/dma/idxd/init.c
>>> @@ -71,9 +71,13 @@ static struct pci_device_id idxd_pci_tbl[] = {
>>>       { PCI_DEVICE_DATA(INTEL, DSA_SPR0, &idxd_driver_data[IDXD_TYPE_DSA]) },
>>>       /* DSA on GNR-D platforms */
>>>       { PCI_DEVICE_DATA(INTEL, DSA_GNRD, &idxd_driver_data[IDXD_TYPE_DSA]) },
>>> +    /* DSA on DMR platforms */
>>> +    { PCI_DEVICE_DATA(INTEL, DSA_DMR, &idxd_driver_data[IDXD_TYPE_DSA]) },
>>>         /* IAX ver 1.0 platforms */
>>>       { PCI_DEVICE_DATA(INTEL, IAX_SPR0, &idxd_driver_data[IDXD_TYPE_IAX]) },
>>> +    /* IAX on DMR platforms */
>>> +    { PCI_DEVICE_DATA(INTEL, IAX_DMR, &idxd_driver_data[IDXD_TYPE_IAX]) },
>>
>> IAA_DMR?
> 
> Sure. Will fix this.
> 
> Also add something in the commit message? "Use IAA in new code instead of old name IAX. The IAX name (e.g. IDXD_TYPE_IAX) is still kept in legacy code"

sure

> 
>>
>>>       { 0, }
>>>   };
>>>   MODULE_DEVICE_TABLE(pci, idxd_pci_tbl);
>>> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
>>> index ff99047dac44..e15ebb3942ae 100644
>>> --- a/include/linux/pci_ids.h
>>> +++ b/include/linux/pci_ids.h
>>> @@ -2707,6 +2707,8 @@
>>>   #define PCI_DEVICE_ID_INTEL_82815_CGC    0x1132
>>>   #define PCI_DEVICE_ID_INTEL_SST_TNG    0x119a
>>>   #define PCI_DEVICE_ID_INTEL_DSA_GNRD    0x11fb
>>> +#define PCI_DEVICE_ID_INTEL_DSA_DMR    0x1212
>>> +#define PCI_DEVICE_ID_INTEL_IAX_DMR    0x1216
>>
>> s/IAX/IAA/ ?
> 
> Ditto.
> 
>>
>>>   #define PCI_DEVICE_ID_INTEL_82092AA_0    0x1221
>>>   #define PCI_DEVICE_ID_INTEL_82437    0x122d
>>>   #define PCI_DEVICE_ID_INTEL_82371FB_0    0x122e
> 
> Thanks.
> 
> -Fenghua

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

end of thread, other threads:[~2024-08-28 23:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28 22:42 [PATCH 0/2] Add a few new DSA/IAX device IDs Fenghua Yu
2024-08-28 22:42 ` [PATCH 1/2] dmaengine: idxd: Add a new DSA device ID on Granite Rapids-D platform Fenghua Yu
2024-08-28 22:46   ` Dave Jiang
2024-08-28 22:42 ` [PATCH 2/2] dmaengine: idxd: Add new DSA and IAA device IDs on Diamond Rapids platform Fenghua Yu
2024-08-28 22:45   ` Dave Jiang
2024-08-28 23:07     ` Fenghua Yu
2024-08-28 23:08       ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox