iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Sven Peter <sven@svenpeter.dev>
Cc: Will Deacon <will@kernel.org>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/dart: Remove iommu_flush_ops
Date: Tue, 21 Sep 2021 16:49:26 +0100	[thread overview]
Message-ID: <87fstyudx5.wl-maz@kernel.org> (raw)
In-Reply-To: <20210921153934.35647-1-sven@svenpeter.dev>

On Tue, 21 Sep 2021 16:39:34 +0100,
Sven Peter <sven@svenpeter.dev> wrote:
> 
> apple_dart_tlb_flush_{all,walk} expect to get a struct apple_dart_domain
> but instead get a struct iommu_domain right now. This breaks those two
> functions and can lead to kernel panics like the one below.
> DART can only invalidate the entire TLB and apple_dart_iotlb_sync will
> already flush everything. There's no need to do that again inside those
> two functions. Let's just drop them.
> 
>   pci 0000:03:00.0: Removing from iommu group 1
>   Unable to handle kernel paging request at virtual address 0000000100000023
>   [...]
>   Call trace:
>    _raw_spin_lock_irqsave+0x54/0xbc
>    apple_dart_hw_stream_command.constprop.0+0x2c/0x130
>    apple_dart_tlb_flush_all+0x48/0x90
>    free_io_pgtable_ops+0x40/0x70
>    apple_dart_domain_free+0x2c/0x44
>    iommu_group_release+0x68/0xac
>    kobject_cleanup+0x4c/0x1fc
>    kobject_cleanup+0x14c/0x1fc
>    kobject_put+0x64/0x84
>    iommu_group_remove_device+0x110/0x180
>    iommu_release_device+0x50/0xa0
>   [...]
> 
> Fixes: 46d1fb072e76b161 ("iommu/dart: Add DART iommu driver")
> Reported-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>

Thanks for addressing this so quickly.

Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2021-09-21 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 15:39 [PATCH] iommu/dart: Remove iommu_flush_ops Sven Peter via iommu
2021-09-21 15:49 ` Marc Zyngier [this message]
2021-09-28  9:38 ` 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=87fstyudx5.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sven@svenpeter.dev \
    --cc=will@kernel.org \
    /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).