> From: Peter Xu <peterx@xxxxxxxxxx> > Sent: Thursday, February 13, 2020 12:00 AM > To: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Subject: Re: [RFC v3 03/25] hw/iommu: introduce IOMMUContext > > On Wed, Feb 12, 2020 at 07:15:13AM +0000, Liu, Yi L wrote: > > [...] > > > While considering your suggestion on dropping one of the two abstract > > layers. I came up a new proposal as below: > > > > We may drop the IOMMUContext in this series, and rename > > DualStageIOMMUObject to HostIOMMUContext, which is per-vfio-container. > > Add an interface in PCI layer(e.g. an callback in PCIDevice) to let vIOMMU get > HostIOMMUContext. > > I think this could cover the requirement of providing explicit method > > for vIOMMU to call into VFIO and then program host IOMMU. > > > > While for the requirement of VFIO to vIOMMU callings (e.g. PRQ), I > > think it could be done via PCI layer by adding an operation in PCIIOMMUOps. > Thoughts? > > Hmm sounds good. :) > > The thing is for the calls to the other direction (e.g. VFIO injecting faults to > vIOMMU), that's neither per-container nor per-device, but per-vIOMMU. > PCIIOMMUOps suites for that job I'd say, which is per-vIOMMU. > > Let's see how it goes. Thanks, let me get a new version by end-of this week. Regards, Yi Liu