diff mbox series

[v5,09/11] xen/arm: Transitional change to build HAS_VPCI on ARM.

Message ID b9653c6247060574cf68e1f780ef1db3dd0c20d3.1633540842.git.rahul.singh@arm.com (mailing list archive)
State New, archived
Headers show
Series PCI devices passthrough on Arm | expand

Commit Message

Rahul Singh Oct. 6, 2021, 5:40 p.m. UTC
This patch will be reverted once we add support for VPCI MSI/MSIX
support on ARM.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
Change in v5: none
Change in v4:
- Added Acked-by: Stefano Stabellini <sstabellini@kernel.org>
- Added Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Change in v3: none
Change in v2: Patch introduced in v2
---
---
 xen/drivers/vpci/Makefile | 3 ++-
 xen/drivers/vpci/header.c | 2 ++
 xen/include/asm-arm/pci.h | 8 ++++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

Comments

Roger Pau Monné Oct. 11, 2021, 11:43 a.m. UTC | #1
On Wed, Oct 06, 2021 at 06:40:35PM +0100, Rahul Singh wrote:
> This patch will be reverted once we add support for VPCI MSI/MSIX
> support on ARM.
> 
> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Reviewed-by: Roger Pau Monné <rogewr.pau@citrix.com>

> ---
> Change in v5: none
> Change in v4:
> - Added Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> - Added Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> Change in v3: none
> Change in v2: Patch introduced in v2
> ---
> ---
>  xen/drivers/vpci/Makefile | 3 ++-
>  xen/drivers/vpci/header.c | 2 ++
>  xen/include/asm-arm/pci.h | 8 ++++++++
>  3 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/vpci/Makefile b/xen/drivers/vpci/Makefile
> index 55d1bdfda0..1a1413b93e 100644
> --- a/xen/drivers/vpci/Makefile
> +++ b/xen/drivers/vpci/Makefile
> @@ -1 +1,2 @@
> -obj-y += vpci.o header.o msi.o msix.o
> +obj-y += vpci.o header.o
> +obj-$(CONFIG_HAS_PCI_MSI) += msi.o msix.o
> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
> index ba9a036202..f8cd55e7c0 100644
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -96,8 +96,10 @@ static void modify_decoding(const struct pci_dev *pdev, uint16_t cmd,
>       * FIXME: punching holes after the p2m has been set up might be racy for
>       * DomU usage, needs to be revisited.
>       */
> +#ifdef CONFIG_HAS_PCI_MSI
>      if ( map && !rom_only && vpci_make_msix_hole(pdev) )
>          return;
> +#endif

FWIW, I would also be fine with providing a dummy inline function for
vpci_make_msix_hole when !CONFIG_HAS_PCI_MSI, but I assume this is a
temporary workaround until MSI is implemented for Arm.

Thanks, Roger.
Bertrand Marquis Oct. 11, 2021, 12:15 p.m. UTC | #2
Hi Roger,

> On 11 Oct 2021, at 12:43, Roger Pau Monné <roger.pau@citrix.com> wrote:
> 
> On Wed, Oct 06, 2021 at 06:40:35PM +0100, Rahul Singh wrote:
>> This patch will be reverted once we add support for VPCI MSI/MSIX
>> support on ARM.
>> 
>> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
>> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> 
> Reviewed-by: Roger Pau Monné <rogewr.pau@citrix.com>

Thanks

> 
>> ---
>> Change in v5: none
>> Change in v4:
>> - Added Acked-by: Stefano Stabellini <sstabellini@kernel.org>
>> - Added Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
>> Change in v3: none
>> Change in v2: Patch introduced in v2
>> ---
>> ---
>> xen/drivers/vpci/Makefile | 3 ++-
>> xen/drivers/vpci/header.c | 2 ++
>> xen/include/asm-arm/pci.h | 8 ++++++++
>> 3 files changed, 12 insertions(+), 1 deletion(-)
>> 
>> diff --git a/xen/drivers/vpci/Makefile b/xen/drivers/vpci/Makefile
>> index 55d1bdfda0..1a1413b93e 100644
>> --- a/xen/drivers/vpci/Makefile
>> +++ b/xen/drivers/vpci/Makefile
>> @@ -1 +1,2 @@
>> -obj-y += vpci.o header.o msi.o msix.o
>> +obj-y += vpci.o header.o
>> +obj-$(CONFIG_HAS_PCI_MSI) += msi.o msix.o
>> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
>> index ba9a036202..f8cd55e7c0 100644
>> --- a/xen/drivers/vpci/header.c
>> +++ b/xen/drivers/vpci/header.c
>> @@ -96,8 +96,10 @@ static void modify_decoding(const struct pci_dev *pdev, uint16_t cmd,
>>      * FIXME: punching holes after the p2m has been set up might be racy for
>>      * DomU usage, needs to be revisited.
>>      */
>> +#ifdef CONFIG_HAS_PCI_MSI
>>     if ( map && !rom_only && vpci_make_msix_hole(pdev) )
>>         return;
>> +#endif
> 
> FWIW, I would also be fine with providing a dummy inline function for
> vpci_make_msix_hole when !CONFIG_HAS_PCI_MSI, but I assume this is a
> temporary workaround until MSI is implemented for Arm.

Yes this is temporary and MSI support will be added on Arm.

Regards
Bertrand

> 
> Thanks, Roger.
Stefano Stabellini Oct. 12, 2021, 1:32 a.m. UTC | #3
On Mon, 11 Oct 2021, Bertrand Marquis wrote:
> Hi Roger,
> 
> > On 11 Oct 2021, at 12:43, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > 
> > On Wed, Oct 06, 2021 at 06:40:35PM +0100, Rahul Singh wrote:
> >> This patch will be reverted once we add support for VPCI MSI/MSIX
> >> support on ARM.
> >> 
> >> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> >> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> >> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> > 
> > Reviewed-by: Roger Pau Monné <rogewr.pau@citrix.com>
> 
> Thanks

Thanks! I committed this patch.
diff mbox series

Patch

diff --git a/xen/drivers/vpci/Makefile b/xen/drivers/vpci/Makefile
index 55d1bdfda0..1a1413b93e 100644
--- a/xen/drivers/vpci/Makefile
+++ b/xen/drivers/vpci/Makefile
@@ -1 +1,2 @@ 
-obj-y += vpci.o header.o msi.o msix.o
+obj-y += vpci.o header.o
+obj-$(CONFIG_HAS_PCI_MSI) += msi.o msix.o
diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
index ba9a036202..f8cd55e7c0 100644
--- a/xen/drivers/vpci/header.c
+++ b/xen/drivers/vpci/header.c
@@ -96,8 +96,10 @@  static void modify_decoding(const struct pci_dev *pdev, uint16_t cmd,
      * FIXME: punching holes after the p2m has been set up might be racy for
      * DomU usage, needs to be revisited.
      */
+#ifdef CONFIG_HAS_PCI_MSI
     if ( map && !rom_only && vpci_make_msix_hole(pdev) )
         return;
+#endif
 
     for ( i = 0; i < ARRAY_SIZE(header->bars); i++ )
     {
diff --git a/xen/include/asm-arm/pci.h b/xen/include/asm-arm/pci.h
index 49c9622902..5532ce3977 100644
--- a/xen/include/asm-arm/pci.h
+++ b/xen/include/asm-arm/pci.h
@@ -26,6 +26,14 @@  struct arch_pci_dev {
     struct device dev;
 };
 
+/* Arch-specific MSI data for vPCI. */
+struct vpci_arch_msi {
+};
+
+/* Arch-specific MSI-X entry data for vPCI. */
+struct vpci_arch_msix_entry {
+};
+
 /*
  * struct to hold the mappings of a config space window. This
  * is expected to be used as sysdata for PCI controllers that