[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v3 03/25] hw/iommu: introduce IOMMUContext
From: |
Peter Xu |
Subject: |
Re: [RFC v3 03/25] hw/iommu: introduce IOMMUContext |
Date: |
Wed, 12 Feb 2020 10:59:58 -0500 |
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.
--
Peter Xu