Re: [PATCH v3 06/34] xen: avoid generation of empty asm/iommu.h

2024-01-08 Thread Oleksii
On Thu, 2024-01-04 at 12:04 +0100, Jan Beulich wrote:
> On 22.12.2023 16:12, Oleksii Kurochko wrote:
> > Signed-off-by: Oleksii Kurochko 
> 
> The change looks okay-ish, but again needs a description: You want to
> explain why you use the absolute minimum of the scopes the two (or,
> in principle, possibly more) #ifdef-s cover.
Sure, I'll add a description to the commit message.

~ Oleksii

> > --- a/xen/include/xen/iommu.h
> > +++ b/xen/include/xen/iommu.h
> > @@ -337,7 +337,9 @@ extern int
> > iommu_add_extra_reserved_device_memory(unsigned long start,
> >  extern int iommu_get_extra_reserved_device_memory(iommu_grdm_t
> > *func,
> >    void *ctxt);
> >  
> > +#ifdef CONFIG_HAS_PASSTHROUGH
> >  #include 
> > +#endif
> >  
> >  #ifndef iommu_call
> >  # define iommu_call(ops, fn, args...) ((ops)->fn(args))
> > @@ -345,7 +347,9 @@ extern int
> > iommu_get_extra_reserved_device_memory(iommu_grdm_t *func,
> >  #endif
> >  
> >  struct domain_iommu {
> > +#ifdef CONFIG_HAS_PASSTHROUGH
> >  struct arch_iommu arch;
> > +#endif
> >  
> >  /* iommu_ops */
> >  const struct iommu_ops *platform_ops;
> 




Re: [PATCH v3 06/34] xen: avoid generation of empty asm/iommu.h

2024-01-04 Thread Jan Beulich
On 22.12.2023 16:12, Oleksii Kurochko wrote:
> Signed-off-by: Oleksii Kurochko 

The change looks okay-ish, but again needs a description: You want to
explain why you use the absolute minimum of the scopes the two (or,
in principle, possibly more) #ifdef-s cover.

Jan

> --- a/xen/include/xen/iommu.h
> +++ b/xen/include/xen/iommu.h
> @@ -337,7 +337,9 @@ extern int 
> iommu_add_extra_reserved_device_memory(unsigned long start,
>  extern int iommu_get_extra_reserved_device_memory(iommu_grdm_t *func,
>void *ctxt);
>  
> +#ifdef CONFIG_HAS_PASSTHROUGH
>  #include 
> +#endif
>  
>  #ifndef iommu_call
>  # define iommu_call(ops, fn, args...) ((ops)->fn(args))
> @@ -345,7 +347,9 @@ extern int 
> iommu_get_extra_reserved_device_memory(iommu_grdm_t *func,
>  #endif
>  
>  struct domain_iommu {
> +#ifdef CONFIG_HAS_PASSTHROUGH
>  struct arch_iommu arch;
> +#endif
>  
>  /* iommu_ops */
>  const struct iommu_ops *platform_ops;




[PATCH v3 06/34] xen: avoid generation of empty asm/iommu.h

2023-12-22 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko 
---
Changes in V3:
 - new patch.
---
 xen/include/xen/iommu.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index f53d045e2c..8adbf29d3b 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -337,7 +337,9 @@ extern int iommu_add_extra_reserved_device_memory(unsigned 
long start,
 extern int iommu_get_extra_reserved_device_memory(iommu_grdm_t *func,
   void *ctxt);
 
+#ifdef CONFIG_HAS_PASSTHROUGH
 #include 
+#endif
 
 #ifndef iommu_call
 # define iommu_call(ops, fn, args...) ((ops)->fn(args))
@@ -345,7 +347,9 @@ extern int 
iommu_get_extra_reserved_device_memory(iommu_grdm_t *func,
 #endif
 
 struct domain_iommu {
+#ifdef CONFIG_HAS_PASSTHROUGH
 struct arch_iommu arch;
+#endif
 
 /* iommu_ops */
 const struct iommu_ops *platform_ops;
-- 
2.43.0