[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276768FA501B5CD573745108CA39@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Wed, 15 Feb 2023 07:24:30 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Nicolin Chen <nicolinc@...dia.com>
CC: Jason Gunthorpe <jgg@...dia.com>,
"joro@...tes.org" <joro@...tes.org>,
"will@...nel.org" <will@...nel.org>,
"robin.murphy@....com" <robin.murphy@....com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"shuah@...nel.org" <shuah@...nel.org>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>
Subject: RE: [PATCH v2 08/10] iommufd/device: Use iommu_group_replace_domain()
> From: Nicolin Chen <nicolinc@...dia.com>
> Sent: Wednesday, February 15, 2023 3:15 PM
>
> But things will be out of control, if user space continues mapping
> something onto domain1's iopt for idev2, even after it is attached
> covertly to domain2's iopt by the replace routine. I wonder how
> kernel should handle this and keep the consistency between IOMMUFD
> objects and iommu_group.
>
this is where I don't understand.
domain mapping just reflects what an address space has.
Take Qemu for example. w/o vIOMMU domain mappings is added/
removed according to the change in the GPA address space.
w/ vIOMMU then it is synced with guest page table.
why would userspace construct mappings for a specific device?
when device is moved from one domain to another domain, it just
bears with whatever the new domain allows it to access.
Powered by blists - more mailing lists