Hi Kunkun,
On 11/28/20 10:01 AM, Kunkun Jiang wrote:
> Hi Eric,
>> @@ -1668,6 +1679,14 @@ static int vfio_connect_container(VFIOGroup *group,
>> AddressSpace *as,
>> VFIOContainer *container;
>> int ret, fd;
>> VFIOAddressSpace *space;
>> +IOMMUMemoryRegion *iommu_mr;
>> +b
Hi Eric,
@@ -1668,6 +1679,14 @@ static int vfio_connect_container(VFIOGroup *group,
AddressSpace *as,
VFIOContainer *container;
int ret, fd;
VFIOAddressSpace *space;
+IOMMUMemoryRegion *iommu_mr;
+bool nested = false;
+
+if (as != &address_space_memory && memory_regi
In case we detect the address space is translated by
a virtual IOMMU which requires HW nested paging to
integrate with VFIO, let's set up the container with
the VFIO_TYPE1_NESTING_IOMMU iommu_type.
Signed-off-by: Eric Auger
---
v4 -> v5:
- fail immediatly if nested is wanted but not supported