linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Huang Rui <ray.huang@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Xiaojian Du <xiaojian.du@amd.com>, Joerg Roedel <jroedel@suse.de>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled
Date: Wed, 17 Mar 2021 15:24:46 +0100	[thread overview]
Message-ID: <YFIRLh3PPiW1hCQZ@8bytes.org> (raw)
In-Reply-To: <3014DA56-84D8-474B-94FE-6FDBB6241F9F@infradead.org>

On Wed, Mar 17, 2021 at 01:37:16PM +0000, David Woodhouse wrote:
> If we can get to the point where we don't even need to check
> amd_iommu_irq_remap in the ...select() function because the IRQ domain
> is never even registered in the case where the flag ends up false, all
> the better :)

This should already be achieved with this patch :)

But the check is still needed if something goes wrong during IOMMU
initialization. In this case the IOMMUs are teared down and the memory
is freed. But the IRQ domains stay registered for now, mostly because
the upper-level APIs to register them lack a deregister function.

I havn't looked into the details yet whether it is suffient to call
irq_domain_remove() on a domain created with
arch_create_remap_msi_irq_domain() for example. This needs more research
on my side :)

Regards,

	Joerg

  reply	other threads:[~2021-03-17 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  9:10 [PATCH 0/3] iommu/amd: Fix booting with amd_iommu=off Joerg Roedel
2021-03-17  9:10 ` [PATCH 1/3] iommu/amd: Move Stoney Ridge check to detect_ivrs() Joerg Roedel
2021-03-17  9:10 ` [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled Joerg Roedel
2021-03-17 11:47   ` David Woodhouse
2021-03-17 13:32     ` Joerg Roedel
2021-03-17 13:37       ` David Woodhouse
2021-03-17 14:24         ` Joerg Roedel [this message]
2021-03-17  9:10 ` [PATCH 3/3] iommu/amd: Keep track of amd_iommu_irq_remap state Joerg Roedel
2021-03-17 10:48 ` [PATCH 0/3] iommu/amd: Fix booting with amd_iommu=off Huang Rui
2021-03-18  9:47   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFIRLh3PPiW1hCQZ@8bytes.org \
    --to=joro@8bytes.org \
    --cc=alexander.deucher@amd.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xiaojian.du@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).