diff mbox series

[v1,1/2] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option

Message ID 20230620152924.23622-1-stewart.hildebrand@amd.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/2] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option | expand

Commit Message

Stewart Hildebrand June 20, 2023, 3:29 p.m. UTC
From: Rahul Singh <rahul.singh@arm.com>

Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though
the feature is not yet complete in the current upstream codebase. The purpose of
this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for
testing and development of PCI passthrough on ARM.

Since PCI passthrough on ARM is still work in progress at this time, make it
depend on UNSUPPORTED.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
(cherry picked from commit 9a08f1f7ce28ec619640ba9ce11018bf443e9a0e from the
 downstream branch [1])

Changes from downstream to v1:
* depends on ARM_64 (Stefano)
* Don't select HAS_VPCI_GUEST_SUPPORT since this config option is not currently
  used in the upstream codebase. This will want to be re-added here once the
  vpci series [2] is merged.
* Don't select ARM_SMMU_V3 since this option can already be selected
  independently. While PCI passthrough on ARM depends on an SMMU, it does not
  depend on a particular version or variant of an SMMU.
* Don't select HAS_ITS since this option can already be selected independently.
  HAS_ITS may want to be added here once the MSI series [1] is merged.
* Don't select LATE_HWDOM since this option is unrelated to PCI passthrough.

[1] https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commits/poc/pci-passthrough
[2] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html
---
 xen/arch/arm/Kconfig | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Julien Grall June 25, 2023, 12:51 p.m. UTC | #1
Hi,

On 20/06/2023 16:29, Stewart Hildebrand wrote:
> From: Rahul Singh <rahul.singh@arm.com>
> 
> Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though
> the feature is not yet complete in the current upstream codebase. The purpose of
> this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for
> testing and development of PCI passthrough on ARM.
> 
> Since PCI passthrough on ARM is still work in progress at this time, make it
> depend on UNSUPPORTED.
> 
> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> ---
> (cherry picked from commit 9a08f1f7ce28ec619640ba9ce11018bf443e9a0e from the
>   downstream branch [1])
> 
> Changes from downstream to v1:
> * depends on ARM_64 (Stefano)
> * Don't select HAS_VPCI_GUEST_SUPPORT since this config option is not currently
>    used in the upstream codebase. This will want to be re-added here once the
>    vpci series [2] is merged.
> * Don't select ARM_SMMU_V3 since this option can already be selected
>    independently. While PCI passthrough on ARM depends on an SMMU, it does not
>    depend on a particular version or variant of an SMMU.
> * Don't select HAS_ITS since this option can already be selected independently.
>    HAS_ITS may want to be added here once the MSI series [1] is merged.
> * Don't select LATE_HWDOM since this option is unrelated to PCI passthrough.
> 
> [1] https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commits/poc/pci-passthrough
> [2] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html
> ---
>   xen/arch/arm/Kconfig | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index 61e581b8c2b0..3d22cd26a68c 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -184,6 +184,15 @@ config STATIC_SHM
>   	help
>   	  This option enables statically shared memory on a dom0less system.
>   
> +config PCI_PASSTHROUGH
> +	bool "PCI passthrough on ARM (UNSUPPORTED)" if UNSUPPORTED

The series is already under an Arm category. So I would drop "ARM" here.

NIT: Also, I think it should be EXPERT rather than UNSUPPORTED. I view 
the former as in more "experimental" than the latter.

> +	depends on ARM_64
> +	select HAS_PCI
> +	select HAS_VPCI
> +	default n
> +	help
> +	  PCI device passthrough on ARM (UNSUPPORTED)

Same.

> +
>   endmenu
>   
>   menu "ARM errata workaround via the alternative framework"

Cheers,
Stewart Hildebrand July 7, 2023, 1:41 a.m. UTC | #2
On 6/25/23 08:51, Julien Grall wrote:
> Hi,
> 
> On 20/06/2023 16:29, Stewart Hildebrand wrote:
>> From: Rahul Singh <rahul.singh@arm.com>
>>
>> Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though
>> the feature is not yet complete in the current upstream codebase. The purpose of
>> this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for
>> testing and development of PCI passthrough on ARM.
>>
>> Since PCI passthrough on ARM is still work in progress at this time, make it
>> depend on UNSUPPORTED.
>>
>> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
>> ---
>> (cherry picked from commit 9a08f1f7ce28ec619640ba9ce11018bf443e9a0e from the
>>   downstream branch [1])
>>
>> Changes from downstream to v1:
>> * depends on ARM_64 (Stefano)
>> * Don't select HAS_VPCI_GUEST_SUPPORT since this config option is not currently
>>    used in the upstream codebase. This will want to be re-added here once the
>>    vpci series [2] is merged.
>> * Don't select ARM_SMMU_V3 since this option can already be selected
>>    independently. While PCI passthrough on ARM depends on an SMMU, it does not
>>    depend on a particular version or variant of an SMMU.
>> * Don't select HAS_ITS since this option can already be selected independently.
>>    HAS_ITS may want to be added here once the MSI series [1] is merged.
>> * Don't select LATE_HWDOM since this option is unrelated to PCI passthrough.
>>
>> [1] https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commits/poc/pci-passthrough
>> [2] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html
>> ---
>>   xen/arch/arm/Kconfig | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
>> index 61e581b8c2b0..3d22cd26a68c 100644
>> --- a/xen/arch/arm/Kconfig
>> +++ b/xen/arch/arm/Kconfig
>> @@ -184,6 +184,15 @@ config STATIC_SHM
>>       help
>>         This option enables statically shared memory on a dom0less system.
>>
>> +config PCI_PASSTHROUGH
>> +     bool "PCI passthrough on ARM (UNSUPPORTED)" if UNSUPPORTED
> 
> The series is already under an Arm category. So I would drop "ARM" here.

OK

> NIT: Also, I think it should be EXPERT rather than UNSUPPORTED. I view
> the former as in more "experimental" than the latter.

OK

>> +     depends on ARM_64
>> +     select HAS_PCI
>> +     select HAS_VPCI
>> +     default n
>> +     help
>> +       PCI device passthrough on ARM (UNSUPPORTED)
> 
> Same.

OK
diff mbox series

Patch

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 61e581b8c2b0..3d22cd26a68c 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -184,6 +184,15 @@  config STATIC_SHM
 	help
 	  This option enables statically shared memory on a dom0less system.
 
+config PCI_PASSTHROUGH
+	bool "PCI passthrough on ARM (UNSUPPORTED)" if UNSUPPORTED
+	depends on ARM_64
+	select HAS_PCI
+	select HAS_VPCI
+	default n
+	help
+	  PCI device passthrough on ARM (UNSUPPORTED)
+
 endmenu
 
 menu "ARM errata workaround via the alternative framework"