[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/9] IOMMU: add common API for device reserved memory
- To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 18 Jul 2022 13:14:43 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bxbXKbWmJ3gL0UC7Ykboo+il6m356gTipUW+r81+sLQ=; b=a0fZwkKnKlKClFzCfWTTre2ZP0+rD7D5OaXY4jqaLRylhBy7/T1YlaT1CbxfPYGGm5OeW+4M87pBvtqw4fA43ozMyu7xdNv9riZMMmikJWGomRgim61qQH6EIlk0ffW9hFFg3E+B6JlQGrnaleLqiJoZnlFhbYlv3nOdL2lCQCAQh9MG7wqxQxrsFxceIU3gqY09MG+Ms6g7pv4MTUafA9DSxocoUaGLOMUdkf+CQ/GghGtg5/f2A4/FUnvJ/sjsYAAaRT6WxTTNbphLyMBzOIu8Ls96l5oDFJ4qoCiE+b1kS8WOvbeqZ4k7YxykE91sfiyewYGTFa4EPVH9EECuyg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KHasQzxO/0bkhuZYT90pYTtviNdrzVdrrRho/xH17JhPNYUrIQRC//xpKNjV6bwdOftXgrk/7+xSIHJvlOlKHiLhEcC0t9GRqzRf++ATEtf5daFgG97Pzdw7vAZTqX87QFWMt2gJ+deowuWyuIQoaVwlocVrrbz0hgFdQaMGYZH1EWENrxWkLxYbUVM+QxU6MATYAnV7cWz1pQPA+8BAyN3P/DqPmICIPBC3pvKYL6sSf+Gb9eb/DPc93xckh3IUYUGMBcKPewFIBLLp43Kn1Lh56JYfVSlcLwmCxsvV6AenT+nYxh3yWVqgnZAK95UoPAdRKXNEzk27RD42xUUZyQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 18 Jul 2022 11:14:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.07.2022 12:53, Marek Marczykowski-Górecki wrote:
> On Thu, Jul 14, 2022 at 12:17:53PM +0200, Jan Beulich wrote:
>> On 06.07.2022 17:32, Marek Marczykowski-Górecki wrote:
>>> --- a/xen/drivers/passthrough/iommu.c
>>> +++ b/xen/drivers/passthrough/iommu.c
>>> @@ -651,6 +651,46 @@ bool_t iommu_has_feature(struct domain *d, enum
>>> iommu_feature feature)
>>> return is_iommu_enabled(d) && test_bit(feature,
>>> dom_iommu(d)->features);
>>> }
>>>
>>> +#define MAX_EXTRA_RESERVED_RANGES 20
>>> +struct extra_reserved_range {
>>> + xen_pfn_t start;
>>
>> Why not unsigned long?
>
> Isn't this the correct type for the page number?
In the public interface - yes. But internally we (almost) universally
use unsigned long. xen_pfn_t is inefficient to use on Arm32 (and then
presumably also other future 32-bit counterparts of 64-bit
architectures, inheriting the choices made for Arm and differing from
what we have on x86).
Jan
|