[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v7 09/26] vfio: Force nested if iommu requires it
From: |
Auger Eric |
Subject: |
Re: [RFC v7 09/26] vfio: Force nested if iommu requires it |
Date: |
Tue, 1 Dec 2020 18:40:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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;
>> + bool nested = false;
>> +
>> + if (as != &address_space_memory && memory_region_is_iommu(as->root)) {
>> + iommu_mr = IOMMU_MEMORY_REGION(as->root);
>> + memory_region_iommu_get_attr(iommu_mr, IOMMU_ATTR_VFIO_NESTED,
>> + (void *)&nested);
>> + }
>>
>> space = vfio_get_address_space(as);
> Is the condition "as != &address_space_memory" needed to determine whether
> a vIOMMU is in place? I think "memory_region_is_iommu(as->root)" is enough.
>
> Looking forward to your reply.:)
Yes I think so.
Thank you for your report!
Eric
>
> Thanks,
>
> Kunkun Jiang
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [RFC v7 09/26] vfio: Force nested if iommu requires it,
Auger Eric <=