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

Re: [PATCH v3 05/10] IOMMU: add common API for device reserved memory


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 4 Aug 2022 16:25:38 +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=IetbBMoHWffjM0VzmYCcH5elwtQEE+dgMmJZJyOKucA=; b=cAKTT3fEG/DtzhWqvnnsgtYJHgs7K86MeyQUnE3MB7oB3ZvqnDcf/aAzunC+B/LsR64Ubxx/Ab4Nwf6RICZohYc14O3/gFfUaUrKiXTeugDC5CRjnLFSWhG2qHPIRzjBYSU5qvIap6UiD3mrDxRj16UWw2de1tCKB+Jtw+cB9FqH9zWzyCPQFCBHZVhRXX/ZJJzNv3vSbqHPFhzFFHsYmNsCUo5s0SmaCRmC3PPQIZbJsBk4AeSKO0qYYVmS6ZhMySwrnnnL7xw7i5KbeVzNWflgpgJtvrD2U6tOb1yUn+dZn+C0N/wGlJxoicjUxO3zxjJK7vAn69mCXqOetdnHSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fJWDntqK5rzWqYowUdmdH8BCTrANJ6w9nQkEHGwClWzIMA9fEqF1dM1DiiyzKTefjXdtPuhVFQcfA4q5BtYo7IrHNcmlkDI11o+oQlA4/NhWo5OZ4US+yLASwlfd7tnt2Gv7XAaa2A9v6/uC4wJl+mELy0giIuQ7cBoiuL/f6wEbbC+Xb8qo3dbxXH0bJ7K5X4iziGAqzXeTqcaUw2RklPG9czXWPYtCaO4N/7BV2KdW3LHv6Tf21i4SH+sn8Rji8Y8rlI2DEzU3PMvF1FONIHK7W6qxkg63f6HNcBxV1Bzs7Zn/Q7kf+qegHk5AKQvL06QRD/cU5Tlk1iN2VKpSPg==
  • 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: Thu, 04 Aug 2022 14:25:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.07.2022 05:23, Marek Marczykowski-Górecki wrote:
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -651,6 +651,51 @@ 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 {
> +    unsigned long start;
> +    unsigned long nr;
> +    uint32_t sbdf;

It's not easy to judge why this isn't pci_sbdf_t when no callers
exist at this point.

> +};
> +static unsigned int __initdata nr_extra_reserved_ranges;
> +static struct extra_reserved_range __initdata
> +    extra_reserved_ranges[MAX_EXTRA_RESERVED_RANGES];

With __initdata here, ...

> +int iommu_add_extra_reserved_device_memory(unsigned long start,
> +                                           unsigned long nr,
> +                                           uint32_t sbdf)

... this and the other function want to be __init.

Jan



 


Rackspace

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