Re: [Xen-devel] [PATCH v3 06/14] AMD/IOMMU: pass IOMMU to amd_iommu_alloc_intremap_table()

2019-07-19 Thread Woods, Brian
On Tue, Jul 16, 2019 at 04:37:26PM +, Jan Beulich wrote:
> The function will want to know IOMMU properties (specifically the IRTE
> size) subsequently.
> 
> Correct indentation of one of the call sites at this occasion.
> 
> Signed-off-by: Jan Beulich 

Acked-by: Brian Woods 

> ---
> v3: New.
> 
> --- a/xen/drivers/passthrough/amd/iommu_acpi.c
> +++ b/xen/drivers/passthrough/amd/iommu_acpi.c
> @@ -74,12 +74,14 @@ static void __init add_ivrs_mapping_entr
>/* allocate per-device interrupt remapping table */
>if ( amd_iommu_perdev_intremap )
>ivrs_mappings[alias_id].intremap_table =
> -amd_iommu_alloc_intremap_table(
> -_mappings[alias_id].intremap_inuse);
> + amd_iommu_alloc_intremap_table(
> + iommu,
> + _mappings[alias_id].intremap_inuse);
>else
>{
>if ( shared_intremap_table == NULL  )
>shared_intremap_table = amd_iommu_alloc_intremap_table(
> + iommu,
>_intremap_inuse);
>ivrs_mappings[alias_id].intremap_table = shared_intremap_table;
>ivrs_mappings[alias_id].intremap_inuse = shared_intremap_inuse;
> --- a/xen/drivers/passthrough/amd/iommu_intr.c
> +++ b/xen/drivers/passthrough/amd/iommu_intr.c
> @@ -632,7 +632,8 @@ int __init amd_iommu_free_intremap_table
>   return 0;
>   }
>   
> -void* __init amd_iommu_alloc_intremap_table(unsigned long **inuse_map)
> +void *__init amd_iommu_alloc_intremap_table(
> +const struct amd_iommu *iommu, unsigned long **inuse_map)
>   {
>   void *tb;
>   tb = __alloc_amd_iommu_tables(INTREMAP_TABLE_ORDER);
> --- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
> +++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
> @@ -97,7 +97,8 @@ struct amd_iommu *find_iommu_for_device(
>   
>   /* interrupt remapping */
>   int amd_iommu_setup_ioapic_remapping(void);
> -void *amd_iommu_alloc_intremap_table(unsigned long **);
> +void *amd_iommu_alloc_intremap_table(
> +const struct amd_iommu *, unsigned long **);
>   int amd_iommu_free_intremap_table(
>   const struct amd_iommu *, struct ivrs_mappings *);
>   void amd_iommu_ioapic_update_ire(
> 

-- 
Brian Woods

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3 06/14] AMD/IOMMU: pass IOMMU to amd_iommu_alloc_intremap_table()

2019-07-19 Thread Andrew Cooper
On 16/07/2019 17:37, Jan Beulich wrote:
> The function will want to know IOMMU properties (specifically the IRTE
> size) subsequently.
>
> Correct indentation of one of the call sites at this occasion.
>
> Signed-off-by: Jan Beulich 

Acked-by: Andrew Cooper 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v3 06/14] AMD/IOMMU: pass IOMMU to amd_iommu_alloc_intremap_table()

2019-07-16 Thread Jan Beulich
The function will want to know IOMMU properties (specifically the IRTE
size) subsequently.

Correct indentation of one of the call sites at this occasion.

Signed-off-by: Jan Beulich 
---
v3: New.

--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -74,12 +74,14 @@ static void __init add_ivrs_mapping_entr
   /* allocate per-device interrupt remapping table */
   if ( amd_iommu_perdev_intremap )
   ivrs_mappings[alias_id].intremap_table =
-amd_iommu_alloc_intremap_table(
-_mappings[alias_id].intremap_inuse);
+ amd_iommu_alloc_intremap_table(
+ iommu,
+ _mappings[alias_id].intremap_inuse);
   else
   {
   if ( shared_intremap_table == NULL  )
   shared_intremap_table = amd_iommu_alloc_intremap_table(
+ iommu,
   _intremap_inuse);
   ivrs_mappings[alias_id].intremap_table = shared_intremap_table;
   ivrs_mappings[alias_id].intremap_inuse = shared_intremap_inuse;
--- a/xen/drivers/passthrough/amd/iommu_intr.c
+++ b/xen/drivers/passthrough/amd/iommu_intr.c
@@ -632,7 +632,8 @@ int __init amd_iommu_free_intremap_table
  return 0;
  }
  
-void* __init amd_iommu_alloc_intremap_table(unsigned long **inuse_map)
+void *__init amd_iommu_alloc_intremap_table(
+const struct amd_iommu *iommu, unsigned long **inuse_map)
  {
  void *tb;
  tb = __alloc_amd_iommu_tables(INTREMAP_TABLE_ORDER);
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
@@ -97,7 +97,8 @@ struct amd_iommu *find_iommu_for_device(
  
  /* interrupt remapping */
  int amd_iommu_setup_ioapic_remapping(void);
-void *amd_iommu_alloc_intremap_table(unsigned long **);
+void *amd_iommu_alloc_intremap_table(
+const struct amd_iommu *, unsigned long **);
  int amd_iommu_free_intremap_table(
  const struct amd_iommu *, struct ivrs_mappings *);
  void amd_iommu_ioapic_update_ire(

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel