RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-26 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, September 21, 2023 2:20 AM > > On Wed, Sep 20, 2023 at 12:17:24PM -0600, Alex Williamson wrote: > > > > The iommufd design requires one open of the /dev/iommu to be shared > > > across all the vfios. > > > > "requires"? It's certainly of limited value

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 9:02 PM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On 9/20/23 14:51, Jason Gunthorpe wrote: >> On Wed, Sep 20, 2023 at 02:19:42PM +0200, Cédric Le Goater wro

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Gunthorpe >Sent: Thursday, September 21, 2023 2:20 AM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On Wed, Sep 20, 2023 at 12:17:24PM -0600, Alex Williamson wrote: > >> > The iommufd design requi

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 8:20 PM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On 9/20/23 05:42, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Alex Williamson
> >From: Cédric Le Goater > > > >Sent: Wednesday, September 20, 2023 1:08 AM > > > >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > > > > > > > >On 8/30/23 12:37, Zhenzhong Duan wrote: > > > >> This adds "--enable

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 12:17:24PM -0600, Alex Williamson wrote: > > The iommufd design requires one open of the /dev/iommu to be shared > > across all the vfios. > > "requires"? It's certainly of limited value to have multiple iommufd > instances rather than create multiple address spaces

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Daniel P . Berrangé
On Wed, Sep 20, 2023 at 12:01:42PM -0600, Alex Williamson wrote: > On Wed, 20 Sep 2023 03:42:20 + > "Duan, Zhenzhong" wrote: > > > >-Original Message- > > >From: Cédric Le Goater > > >Sent: Wednesday, September 20, 2023 1:08 AM

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Alex Williamson
On Wed, 20 Sep 2023 14:49:19 -0300 Jason Gunthorpe wrote: > On Wed, Sep 20, 2023 at 07:37:53PM +0200, Eric Auger wrote: > > > >> qemu will typically not be able to > > >> self-open /dev/iommufd as it is root-only. > > > > > > I don't understand, we open multiple fds to KVM devices. This is

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 12:01:42PM -0600, Alex Williamson wrote: > On Wed, 20 Sep 2023 03:42:20 + > "Duan, Zhenzhong" wrote: > > > >-Original Message- > > >From: Cédric Le Goater > > >Sent: Wednesday, September 20, 2023 1:08 AM

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Alex Williamson
On Wed, 20 Sep 2023 03:42:20 + "Duan, Zhenzhong" wrote: > >-Original Message- > >From: Cédric Le Goater > >Sent: Wednesday, September 20, 2023 1:08 AM > >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > > > >On 8/30/23

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 07:37:53PM +0200, Eric Auger wrote: > >> qemu will typically not be able to > >> self-open /dev/iommufd as it is root-only. > > > > I don't understand, we open multiple fds to KVM devices. This is the > > same. > Actually qemu opens the /dev/iommu in case no fd is passed

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Eric Auger
- >>>>> From: Cédric Le Goater >>>>> Sent: Wednesday, September 20, 2023 1:08 AM >>>>> Subject: Re: [PATCH v1 15/22] Add iommufd configure option >>>>> >>>>> On 8/30/23 12:37, Zhenzhong Duan wrote: >>>>>&

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Daniel P . Berrangé
ic Le Goater > > > > Sent: Wednesday, September 20, 2023 1:08 AM > > > > Subject: Re: [PATCH v1 15/22] Add iommufd configure option > > > > > > > > On 8/30/23 12:37, Zhenzhong Duan wrote: > > > > > This adds "--enable-iommufd/--

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Cédric Le Goater
On 9/20/23 14:51, Jason Gunthorpe wrote: On Wed, Sep 20, 2023 at 02:19:42PM +0200, Cédric Le Goater wrote: On 9/20/23 05:42, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Wednesday, September 20, 2023 1:08 AM Subject: Re: [PATCH v1 15/22] Add iommufd

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 02:19:42PM +0200, Cédric Le Goater wrote: > On 9/20/23 05:42, Duan, Zhenzhong wrote: > > > > > > > -Original Message- > > > From: Cédric Le Goater > > > Sent: Wednesday, September 20, 2023 1:08 AM > > > Subject

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 02:01:39PM +0100, Daniel P. Berrangé wrote: > Assuming we must have the exact same FD used for all vfio-pci devices, > then using -object iommufd is the least worst way to get that FD > injected into QEMU from libvirt. Yes, same FD. It is a shared resource. Jason

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Cédric Le Goater
On 9/20/23 05:42, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Wednesday, September 20, 2023 1:08 AM Subject: Re: [PATCH v1 15/22] Add iommufd configure option On 8/30/23 12:37, Zhenzhong Duan wrote: This adds "--enable-iommufd/--disable-iommufd"

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-19 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 1:08 AM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> This adds "--enable-iommufd/--disable-iommufd" to en

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-19 Thread Cédric Le Goater
On 8/30/23 12:37, Zhenzhong Duan wrote: This adds "--enable-iommufd/--disable-iommufd" to enable or disable iommufd support, enabled by default. Why would someone want to disable support at compile time ? It might have been useful for dev but now QEMU should self-adjust at runtime depending