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

Re: [PATCH v6 4/8] iommu: make map and unmap take a page count, similar to flush


  • To: Paul Durrant <paul@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 10 Sep 2020 16:45:50 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=HfoJdk0aGkzMxmHSz6cxXvqH9Q0rk1u+Gf5Dfze+9Zs=; b=Aj/8zKFdEJHuEQT29W4ttXhI3AzaVtJ4mfKUgW1t/Iy1nJGktJF/rAM+j2c7T3ZMiaMvMmCXad4RZeWzR0Yrkqn+n2LnQkg1ZoZdWutSV2OeAGiKOA0i2OVRE0AM/pyJ5pjHS7+qDzsmaHbOthGJzA48BLCFm+iRhzDrCAmTZ+KvQmhOjNltWC/NaidcErrJIh80Sf7XCdPHTUa5t4qV5BIhs5LycNa3BZKUglaDtRWPnGcXS65QwFpYop5InuKHq0UF/Z5P8QoCHc3/0DddjJhHEDO1xtiRo2Eh1CIqQWmlwQdeTI3gxwfsVpdF6BBuURkvQc5saI3KxMbM4fPXGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Znvrs8oJSexZCf61bJtzoXT83M25uL3Q6YuYrhvjDm3IbsgG1vePGdpGY8pC0muLYBAWfv+cOYKLVYarY2W2vB9lWhU3LIImq+wLzz/4BJHk/rwsZxnHSyWotZl2z8uec5h5DNOm9gBJBHFMQWc9CuATleOXaLZL1TXIiSxGqxhRA88n1K14YJMTzWlW6P4pC8JZSn4UKWOAThYfuqz8Ar/UDlF7/i1EBLfsdEM07/hOgEMPbqsz05H9YutbTsJmpKu3eQvRHEIaQsdN7ptuN1U6IDQlksJpfAmEVYw+0AXj/+AUVlQQFvIKy0I/PWRAoJQ4RZtDc1b3UWYaWF5hfg==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "open list:X86" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Paul Durrant <pdurrant@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Thu, 10 Sep 2020 16:46:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWh4IX72/mBoqf+EKYBSK7g6LWxqliEpCAgAACGQA=
  • Thread-topic: [PATCH v6 4/8] iommu: make map and unmap take a page count, similar to flush

>> diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
>> index 1831dc66b0..13f68dc93d 100644
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -146,23 +146,23 @@ enum
>> #define IOMMU_FLUSHF_modified (1u << _IOMMU_FLUSHF_modified)
>> 
>> int __must_check iommu_map(struct domain *d, dfn_t dfn, mfn_t mfn,
>> -                           unsigned int page_order, unsigned int flags,
>> +                           unsigned long page_count, unsigned int flags,
>>                           unsigned int *flush_flags);
>> int __must_check iommu_unmap(struct domain *d, dfn_t dfn,
>> -                             unsigned int page_order,
>> +                             unsigned long page_count,
>>                             unsigned int *flush_flags);
>> 
>> int __must_check iommu_legacy_map(struct domain *d, dfn_t dfn, mfn_t mfn,
>> -                                  unsigned int page_order,
>> +                                  unsigned long page_count,
>>                                  unsigned int flags);
>> int __must_check iommu_legacy_unmap(struct domain *d, dfn_t dfn,
>> -                                    unsigned int page_order);
>> +                                    unsigned long page_count);
>> 
>> int __must_check iommu_lookup_page(struct domain *d, dfn_t dfn, mfn_t *mfn,
>>                                   unsigned int *flags);
>> 
>> int __must_check iommu_iotlb_flush(struct domain *d, dfn_t dfn,
>> -                                   unsigned int page_count,
>> +                                   unsigned long page_count,
>>                                   unsigned int flush_flags);
>> int __must_check iommu_iotlb_flush_all(struct domain *d,
>>                                       unsigned int flush_flags);
>> @@ -281,7 +281,7 @@ struct iommu_ops {
>>    void (*share_p2m)(struct domain *d);
>>    void (*crash_shutdown)(void);
>>    int __must_check (*iotlb_flush)(struct domain *d, dfn_t dfn,
>> -                                    unsigned int page_count,
>> +                                    unsigned long page_count,
> 
> This change will require to change the arm smmu code to have the right type 
> for page count:
> xen/drivers/passthrough/smmu.c:2536
> static int __must_check arm_smmu_iotlb_flush(struct domain *d, dfn_t dfn,
>                         unsigned int page_count,
>                         unsigned int flush_flags)
> 
> Otherwise compilation is failing for arm.
> 
> With that fixed i could compile and start an arm system with the complete 
> serie (but not one with an arm SMMU).

I should have specified because my test system right now does not have an 
SMMUv1.

Bertrand




 


Rackspace

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