[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2.2 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 25 Feb 2022 09:24:38 +0100
- 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=SYGTJnML6h9d+Pm5Co7dP/w8whbD+gt2kiCOAepd1NU=; b=TkI3owUYThu61jDfolHL2yXYdKBcS59rrHS3Hc90LhUn+mUVNTGVfgfKcTQUVj5yMblag2JTtqsuQD5KlXr1EzRhetw2IUxBArHN+oixwvY0fhRLU9iHdMetz6xD6lMaTnzSizAhfq7yCfebym9jdrcTvN5bCyp8cLIlLZHTEKU6bc5pyFdxVOsQG5Uxoopx9YufAee/Py05U4AskA+PTEu/1LUwIHpb0Rm8fuPcFDYp9Aj9QZ+h4wFWyoGHel5yU3paCgZZIzLb1FindrolKtuOjjCkPtBjULE5WWWj9pCkEODlWdZzG4xAl4mc3+5IlqMKRUEqyKySPMm7K26hhw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jXjzgozWzh+RG7m6N+rLxvmkUasypGGTLXeaOFwy4yCZo0VmM70JiC2GgTJRJb5OVMzLCTq8/2buqleJBw5XXXbwAlGTirlGQQZ57X2tMDlCQfuIw/ZoygTn/VLNolYKWce1oP9mryD4JEKP7nU7S9zncPifZOLFDVqOb+XG5BViptc/ic/zb47HKRby3lBs4UTi6sdhY8l5Wr9tzlDpRVVBrk8Dq/6Q8S6aj+w6vln0FZcovGrDxLZKPZtZMFtBp6E0dj/151y2d46+1GxC5J8TNRF9TqlBh6geDzuA01YpFpYST7Dq9JGoo+2lmU+JrI/VRyu8/SJhIlmqNgSLgQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 25 Feb 2022 08:24:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22.02.2022 12:47, Andrew Cooper wrote:
> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
> @@ -628,7 +628,7 @@ static void cf_check amd_dump_page_tables(struct domain
> *d)
> hd->arch.amd.paging_mode, 0, 0);
> }
>
> -static const struct iommu_ops __initconstrel _iommu_ops = {
> +static const struct iommu_ops __initconst_cf_clobber _iommu_ops = {
Following my initcall related remark on x86'es time.c I'm afraid I don't
see how this and ...
> @@ -2794,7 +2793,7 @@ static int __init cf_check
> intel_iommu_quarantine_init(struct domain *d)
> return rc;
> }
>
> -static struct iommu_ops __initdata vtd_ops = {
> +static const struct iommu_ops __initconst_cf_clobber vtd_ops = {
... this actually works. But I guess I must be overlooking something, as
I'm sure that you did test the change.
Both ops structures reference a function, through .adjust_irq_affinities,
which isn't __init but which is used (besides here) for an initcall. With
the ENDBR removed by the time initcalls are run, these should cause #CP.
Jan
|