[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: "Woods, Brian" <Brian.Woods@xxxxxxx>
  • Date: Fri, 19 Jul 2019 18:27:06 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=amd.com;dmarc=pass action=none header.from=amd.com;dkim=pass header.d=amd.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZR0CRGiS01IBZT4t4R5zQUeQd+Z4ioVkxk5CiavRrmQ=; b=oBmL0Yp8MpGrXwjziIBoAJzXZ+hFIXtBgFdBpwBniQWc0uTidgoKaJAUNFLFp9aX8YxjaAiZj4jMnLFKt2nTEbOybwIJnpQNeXFa8YXTUSIyDsn2yMTL8KmHC/OrUDubJ8LjCZ4Tqwh1wntKXJsUq0XXebdk9AIpGvhhl0mwaL/In2gbAL0ROf3m6NkZo4V98dcKKs3vojEVzP1D6fRLVTREYoqTjVbcsUO9vF9bgwKOWXSc3Z2Q7nQwxsJnHj1RIvv6iXA79Tyms/kATfDnGqId+m6vWvQwnQMe68SdUiogIjKtxi8R3rEhhGUPI9RfbitcW54DsjszbJGv6U+q5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kd/C/mCKt/df6XO9j5eB4toniz1gHaa46oqVbefWW9nvhLwFjdgYsr8elD6TxFi4jQ1stF3A8PnP+jw7UyJelVJrgXMlTd8FSZPGv2ZDW03EWGoEUS/KX7nDFf/+GkN9tLeioFBANYhY+LRXEIza9V+bvRtWPVlloIcPairL2XbE4Ymwp0RFheAaPcgG1GPD8pPUovutnSSj/8Kd6lfbp2TvW5fcp7iTSKn8HtvMp30tVdYE+Vtate+pLfzqrUIC5OedM8IIS0e2c6GFQZf3dCn/zIEn3d0M9+DE/DKNRp32GlAnMPShfzw/ApuxuFnjwYESSBapP51w5AS6NgTv9w==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Woods@xxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Woods, Brian" <Brian.Woods@xxxxxxx>, "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 19 Jul 2019 18:27:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVO/Ub6nM/uQWgm0mN0o5ojpwgx6bSRzYA
  • Thread-topic: [PATCH v3 06/14] AMD/IOMMU: pass IOMMU to amd_iommu_alloc_intremap_table()

On Tue, Jul 16, 2019 at 04:37:26PM +0000, 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 <jbeulich@xxxxxxxx>

Acked-by: Brian Woods <brian.woods@xxxxxxx>

> ---
> 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(
> -                    &ivrs_mappings[alias_id].intremap_inuse);
> +                 amd_iommu_alloc_intremap_table(
> +                     iommu,
> +                     &ivrs_mappings[alias_id].intremap_inuse);
>            else
>            {
>                if ( shared_intremap_table == NULL  )
>                    shared_intremap_table = amd_iommu_alloc_intremap_table(
> +                     iommu,
>                        &shared_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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.