[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
- [PATCH v5 05/20] vfio/iommufd: Add support for iova_ranges and pgsizes, (continued)
- [PATCH v5 05/20] vfio/iommufd: Add support for iova_ranges and pgsizes, Zhenzhong Duan, 2023/11/09
- [PATCH v5 06/20] vfio/pci: Extract out a helper vfio_pci_get_pci_hot_reset_info, Zhenzhong Duan, 2023/11/09
- [PATCH v5 07/20] vfio/pci: Introduce a vfio pci hot reset interface, Zhenzhong Duan, 2023/11/09
- [PATCH v5 08/20] vfio/iommufd: Enable pci hot reset through iommufd cdev interface, Zhenzhong Duan, 2023/11/09
- [PATCH v5 09/20] vfio/pci: Allow the selection of a given iommu backend, Zhenzhong Duan, 2023/11/09
- [PATCH v5 12/20] vfio/platform: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/09
- [PATCH v5 11/20] vfio/platform: Allow the selection of a given iommu backend, Zhenzhong Duan, 2023/11/09
- [PATCH v5 10/20] vfio/pci: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/09
[PATCH v5 14/20] vfio/ap: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/09
[PATCH v5 13/20] vfio/ap: Allow the selection of a given iommu backend, Zhenzhong Duan, 2023/11/09
[PATCH v5 15/20] vfio/ccw: Allow the selection of a given iommu backend, Zhenzhong Duan, 2023/11/09