All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: Sven Peter <sven@svenpeter.dev>, Janne Grunau <j@jannau.net>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] iommu/dart: Set DMA domain for locked DARTs
Date: Tue, 11 Feb 2025 20:37:08 +0000	[thread overview]
Message-ID: <c4c54243-d25b-45d7-97d5-837d02cfa2dd@arm.com> (raw)
In-Reply-To: <Z6uZhQtPAE8Ck_b0@blossom>

On 2025-02-11 6:40 pm, Alyssa Rosenzweig wrote:
> Hi Robin,
> 
>>> This is required.
>>
>> Now that we can, I'd really rather do this properly and not offer an
>> identity domain in the first place when it's not available.
> 
> I'm reading through iommu.c but I don't see a way to avoid offering an
> identity domain without the DMA override here, just reading through the
> logic of iommu_get_default_domain_type. Could you point me to what you
> have in mind?

Since we finished cleaning up the domain allocation paths, it's finally 
safe to have per-instance ops, so you can mix and match some with an 
identity domain and some without, as s390 will be doing[1].

Cheers,
Robin.

[1] 
https://lore.kernel.org/linux-iommu/20250207205335.473946-5-mjrosato@linux.ibm.com/

> Thanks,
> Alyssa
> 
>>> --- a/drivers/iommu/apple-dart.c
>>> +++ b/drivers/iommu/apple-dart.c
>>> @@ -941,6 +941,8 @@ static int apple_dart_def_domain_type(struct device *dev)
>>>    		return IOMMU_DOMAIN_IDENTITY;
>>>    	if (!cfg->stream_maps[0].dart->supports_bypass)
>>>    		return IOMMU_DOMAIN_DMA;
>>> +	if (cfg->stream_maps[0].dart->locked)
>>> +		return IOMMU_DOMAIN_DMA;
>>>    	return 0;
>>>    }
>>>
>>


  reply	other threads:[~2025-02-11 20:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 19:39 [PATCH 0/5] iommu: apple-dart: Support locked DARTs Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 1/5] iommu/dart: Track if the DART is locked Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 2/5] iommu/dart: Skip reset for locked DARTs Alyssa Rosenzweig
2025-02-11 18:34   ` Robin Murphy
2025-02-11 18:44     ` Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 3/5] iommu/dart: Set DMA domain " Alyssa Rosenzweig
2025-02-11 18:25   ` Robin Murphy
2025-02-11 18:40     ` Alyssa Rosenzweig
2025-02-11 20:37       ` Robin Murphy [this message]
2025-02-10 19:39 ` [PATCH 4/5] iommu/dart: Reject identity " Alyssa Rosenzweig
2025-02-11  6:07   ` Nick Chan
2025-02-11 12:17     ` Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 5/5] iommu/dart: Assert !locked when configuring Alyssa Rosenzweig
2025-02-11 18:41   ` Robin Murphy
2025-02-11 19:20     ` Alyssa Rosenzweig
2025-02-11 19:21     ` Janne Grunau
2025-02-11 21:13       ` Robin Murphy
2025-02-10 19:48 ` [PATCH 0/5] iommu: apple-dart: Support locked DARTs Neal Gompa

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=c4c54243-d25b-45d7-97d5-837d02cfa2dd@arm.com \
    --to=robin.murphy@arm.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=iommu@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.