From: Yi Liu <yi.l.liu@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Nicolin Chen <nicolinc@nvidia.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
Robin Murphy <robin.murphy@arm.com>,
"Joerg Roedel" <joro@8bytes.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Subject: Re: About unmap pages and set dirty tracking on nested parent domain
Date: Fri, 26 Jan 2024 17:36:00 +0800 [thread overview]
Message-ID: <08a2a1f7-4cf1-482b-a982-f6fffd44ac13@intel.com> (raw)
In-Reply-To: <20240126001909.GU1455070@nvidia.com>
On 2024/1/26 08:19, Jason Gunthorpe wrote:
> On Thu, Jan 25, 2024 at 10:03:31AM -0400, Jason Gunthorpe wrote:
>> On Thu, Jan 25, 2024 at 09:55:46PM +0800, Yi Liu wrote:
>>> Hi Jason, Kevin,
>>>
>>> Today, Intel iommu driver only tracks attached devices/iommus in the nested
>>> domain. While the nested parent domain does not.
>>
>> Heh, I was just looking at this bug on my ARM implemention too :)
>
> What I did for SMMU is on my github how:
>
> https://github.com/jgunthorpe/linux/commits/smmuv3_newapi/
>
> See iommu/arm-smmu-v3: Support IOMMU_DOMAIN_NESTED
thanks for the sharing.
> The list that tracks where the iommu domain sends its invalidations
> gets a flag indicating that ATC has to be a full flush
yeah, I pass a 0 - MAX to do it.
> The domain gets a flag that says the IOTLB has to be a full flush (to
> wipe the nest child entries too)
yes
> Also note that if the VM is being relied on to generate ATC
> invalidations then the hypervisor must also track the VM's ATS
> state. If the VM thinks ATS is off then it will not issue ATC flushes.
for now, we don't rely on VM to issue ATC invalidations as we don't have
plan to forward the ATC invalidation timeout error to VM. As one of your
prior remarks (it should have be handled in a RAS arch). So we don't really
need VM to generate ATC invalidation since intel iommu driver will flush
ATC if host has enabled it. So I think VT-d side is fine on this so far.
> ARM has a convenient STE bit that makes this simple, otherwise the VMM
> will have to trap the PCI-E ATS config write and forward it through
> iommufd somehow.
yes. This may need new API for device driver (VFIO) to pass such info.
> Tracking all the ATS stuff was a big PITA, I think the approach I got
> for SMMU is pretty good though.
--
Regards,
Yi Liu
next prev parent reply other threads:[~2024-01-26 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 13:55 About unmap pages and set dirty tracking on nested parent domain Yi Liu
2024-01-25 14:03 ` Jason Gunthorpe
2024-01-26 0:19 ` Jason Gunthorpe
2024-01-26 9:36 ` Yi Liu [this message]
2024-01-26 9:30 ` Yi Liu
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=08a2a1f7-4cf1-482b-a982-f6fffd44ac13@intel.com \
--to=yi.l.liu@intel.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@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