RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-14 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Tuesday, November 14, 2023 5:41 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > > >>> The only tool we have for configuring the schema is the 'if' >>> condition

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-14 Thread Cédric Le Goater
The only tool we have for configuring the schema is the 'if' conditional. 'if': 'CONFIG_IOMMUFD' compiles to #if defined(CONFIG_IOMMUFD) ... #endif. Your use of #ifdef CONFIG_IOMMUFD above suggests this is fine here. Symbols that are only defined in target-dependent compiles (see

RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-09 Thread Duan, Zhenzhong
>-Original Message- >From: Markus Armbruster >Sent: Thursday, November 9, 2023 5:05 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > >Cédric Le Goater writes: > >> On 11/8/23 11:30, Markus Armbruster wrote: >>> Cédr

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-09 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/8/23 11:30, Markus Armbruster wrote: >> Cédric Le Goater writes: >> >>> Hello Markus, >>> >>> On 11/8/23 06:50, Markus Armbruster wrote: Cédric Le Goater writes: > On 11/2/23 08:12, Zhenzhong Duan wrote: >> From: Eric Auger >> Introduce

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-08 Thread Cédric Le Goater
On 11/8/23 11:30, Markus Armbruster wrote: Cédric Le Goater writes: Hello Markus, On 11/8/23 06:50, Markus Armbruster wrote: Cédric Le Goater writes: On 11/2/23 08:12, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-08 Thread Markus Armbruster
Cédric Le Goater writes: > Hello Markus, > > On 11/8/23 06:50, Markus Armbruster wrote: >> Cédric Le Goater writes: >> >>> On 11/2/23 08:12, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host /dev/iommu device. The

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-08 Thread Cédric Le Goater
Hello Markus, On 11/8/23 06:50, Markus Armbruster wrote: Cédric Le Goater writes: On 11/2/23 08:12, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host /dev/iommu device. The /dev/iommu can have been already pre-opened outside of

RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-08 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, November 8, 2023 5:41 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > >>>> + hwaddr iova, ram_addr_t size) >>>>

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-08 Thread Cédric Le Goater
+ hwaddr iova, ram_addr_t size) +{ +int ret; +struct iommu_ioas_unmap unmap = { +.size = sizeof(unmap), +.ioas_id = ioas_id, +.iova = iova, +.length = size, +}; + +ret = ioctl(be->fd, IOMMU_IOAS_UNMAP, ); +

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-07 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/2/23 08:12, Zhenzhong Duan wrote: >> From: Eric Auger >> Introduce an iommufd object which allows the interaction >> with the host /dev/iommu device. >> The /dev/iommu can have been already pre-opened outside of qemu, >> in which case the fd can be passed

RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-07 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Tuesday, November 7, 2023 9:33 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > >On 11/2/23 08:12, Zhenzhong Duan wrote: >> From: Eric Auger [...] >> diff --git a/qapi/qom

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-07 Thread Cédric Le Goater
On 11/2/23 08:12, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host /dev/iommu device. The /dev/iommu can have been already pre-opened outside of qemu, in which case the fd can be passed directly along with the iommufd object: This