qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v5 11/20] vfio/platform: Allow the selection of a given iommu


From: Duan, Zhenzhong
Subject: RE: [PATCH v5 11/20] vfio/platform: Allow the selection of a given iommu backend
Date: Fri, 10 Nov 2023 09:08:08 +0000


>-----Original Message-----
>From: Cédric Le Goater <clg@redhat.com>
>Sent: Friday, November 10, 2023 4:50 PM
>Subject: Re: [PATCH v5 11/20] vfio/platform: Allow the selection of a given
>iommu backend
>
>On 11/9/23 12:45, Zhenzhong Duan wrote:
>> Now we support two types of iommu backends, let's add the capability
>> to select one of them. This depends on whether an iommufd object has
>> been linked with the vfio-platform device:
>>
>> If the user wants to use the legacy backend, it shall not
>> link the vfio-platform device with any iommufd object:
>>
>>   -device vfio-platform,host=XXX
>>
>> This is called the legacy mode/backend.
>>
>> If the user wants to use the iommufd backend (/dev/iommu) it
>> shall pass an iommufd object id in the vfio-platform device options:
>>
>>   -object iommufd,id=iommufd0
>>   -device vfio-platform,host=XXX,iommufd=iommufd0
>>
>> Suggested-by: Alex Williamson <alex.williamson@redhat.com>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> ---
>>   include/hw/vfio/vfio-platform.h | 1 +
>>   hw/vfio/platform.c              | 5 +++++
>>   2 files changed, 6 insertions(+)
>>
>> diff --git a/include/hw/vfio/vfio-platform.h 
>> b/include/hw/vfio/vfio-platform.h
>> index c414c3dffc..f57f4276f2 100644
>> --- a/include/hw/vfio/vfio-platform.h
>> +++ b/include/hw/vfio/vfio-platform.h
>> @@ -18,6 +18,7 @@
>>
>>   #include "hw/sysbus.h"
>>   #include "hw/vfio/vfio-common.h"
>> +#include "sysemu/iommufd.h"
>>   #include "qemu/event_notifier.h"
>>   #include "qemu/queue.h"
>>   #include "qom/object.h"
>I think we can move this change including "sysemu/iommufd.h" to file
>"hw/vfio/platform.c"

Make sense, will do.

Thanks
Zhenzhong

reply via email to

[Prev in Thread] Current Thread [Next in Thread]