From: Jason Gunthorpe <jgg@nvidia.com>
To: Yi Liu <yi.l.liu@intel.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: Thu, 25 Jan 2024 20:19:09 -0400 [thread overview]
Message-ID: <20240126001909.GU1455070@nvidia.com> (raw)
In-Reply-To: <20240125140331.GQ1455070@nvidia.com>
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
The list that tracks where the iommu domain sends its invalidations
gets a flag indicating that ATC has to be a full flush
The domain gets a flag that says the IOTLB has to be a full flush (to
wipe the nest child entries too)
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.
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.
Tracking all the ATS stuff was a big PITA, I think the approach I got
for SMMU is pretty good though.
Jason
next prev parent reply other threads:[~2024-01-26 0:19 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 [this message]
2024-01-26 9:36 ` Yi Liu
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=20240126001909.GU1455070@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=yi.l.liu@intel.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 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.