RE: [PATCH v4 17/17] tests/qtest: Add intel-iommu test

2024-09-30 Thread Duan, Zhenzhong
Sorry, forgot to update to new parameter "x-scalable-mode=on,x-fls=on", will resend this patch only. Thanks Zhenzhong >-Original Message- >From: Duan, Zhenzhong >Subject: [PATCH v4 17/17] tests/qtest: Add intel-iommu test > >Add the framework to te

RE: [PATCH v3 06/17] intel_iommu: Implement stage-1 translation

2024-09-29 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v3 06/17] intel_iommu: Implement stage-1 translation > >On 2024/9/11 13:22, Zhenzhong Duan wrote: >> From: Yi Liu >> >> This adds stage-1 page table walking to support stage-1 only >> transltion in scalable modern mode. > >a typo

RE: [PATCH v3 05/17] intel_iommu: Rename slpte to pte

2024-09-29 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v3 05/17] intel_iommu: Rename slpte to pte > >On 2024/9/11 13:22, Zhenzhong Duan wrote: >> From: Yi Liu ... >> @@ -1918,13 +1919,13 @@ static bool >vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, >> >> cc_entry

RE: [PATCH v3 14/17] intel_iommu: Set default aw_bits to 48 in scalable modern mode

2024-09-28 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 14/17] intel_iommu: Set default aw_bits to 48 in >scalable modern mode > >On Fri, Sep 27, 2024 at 2:39 PM Duan, Zhenzhong > wrote: >> >> >> >> >-Original Message- >&g

RE: [PATCH v3 15/17] intel_iommu: Modify x-scalable-mode to be string option to expose scalable modern mode

2024-09-28 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 15/17] intel_iommu: Modify x-scalable-mode to be >string option to expose scalable modern mode > >On Fri, Sep 27, 2024 at 2:39 PM Duan, Zhenzhong > wrote: >> >> >> >> >

RE: [PATCH v3 12/17] intel_iommu: Add support for PASID-based device IOTLB invalidation

2024-09-28 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 12/17] intel_iommu: Add support for PASID-based >device IOTLB invalidation > >On Fri, Sep 27, 2024 at 3:18 PM Duan, Zhenzhong > wrote: >> >> >> >> >-Original Message-

RE: [PATCH v3 12/17] intel_iommu: Add support for PASID-based device IOTLB invalidation

2024-09-27 Thread Duan, Zhenzhong
>-Original Message- >From: Duan, Zhenzhong >Subject: RE: [PATCH v3 12/17] intel_iommu: Add support for PASID-based >device IOTLB invalidation > > > >>-Original Message- >>From: Jason Wang >>Subject: Re: [PATCH v3 12/17] intel_iommu: Add

RE: [PATCH v3 12/17] intel_iommu: Add support for PASID-based device IOTLB invalidation

2024-09-27 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 12/17] intel_iommu: Add support for PASID-based >device IOTLB invalidation > >On Wed, Sep 11, 2024 at 1:27 PM Zhenzhong Duan > wrote: >> >> From: Clément Mathieu--Drif >> >> Signed-off-by: Clément Mathieu--Drif >> Signed-off

RE: [PATCH v3 16/17] intel_iommu: Introduce a property to control FS1GP cap bit setting

2024-09-27 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 16/17] intel_iommu: Introduce a property to control >FS1GP cap bit setting > >On Wed, Sep 11, 2024 at 1:27 PM Zhenzhong Duan > wrote: >> >> This gives user flexibility to turn off FS1GP for debug purpose. >> >> It is also usef

RE: [PATCH v3 15/17] intel_iommu: Modify x-scalable-mode to be string option to expose scalable modern mode

2024-09-26 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 15/17] intel_iommu: Modify x-scalable-mode to be >string option to expose scalable modern mode > >On Wed, Sep 11, 2024 at 1:27 PM Zhenzhong Duan > wrote: >> >> From: Yi Liu >> >> Intel VT-d 3.0 introduces scalable mode, and i

RE: [PATCH v3 14/17] intel_iommu: Set default aw_bits to 48 in scalable modern mode

2024-09-26 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 14/17] intel_iommu: Set default aw_bits to 48 in >scalable modern mode > >On Wed, Sep 11, 2024 at 1:27 PM Zhenzhong Duan > wrote: >> >> According to VTD spec, stage-1 page table could support 4-level and >> 5-level paging. >>

RE: [PATCH v3 08/17] intel_iommu: Set accessed and dirty bits during first stage translation

2024-09-26 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 08/17] intel_iommu: Set accessed and dirty bits >during first stage translation > >On Wed, Sep 11, 2024 at 1:26 PM Zhenzhong Duan > wrote: >> >> From: Clément Mathieu--Drif >> >> Signed-off-by: Clément Mathieu--Drif >> Signe

RE: [PATCH v3 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-09-26 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH v3 04/17] intel_iommu: Flush stage-2 cache in PASID- >selective PASID-based iotlb invalidation > >On Wed, Sep 11, 2024 at 1:26 PM Zhenzhong Duan > wrote: >> >> Per spec 6.5.2.4, PADID-selective PASID-based iotlb invalidation will

Re: [PATCH v3 00/17] intel_iommu: Enable stage-1 translation for emulated device

2024-09-26 Thread Duan, Zhenzhong
Hi All, Kindly ping, more comments are appreciated:) Thanks Zhenzhong On 9/11/2024 1:22 PM, Zhenzhong Duan wrote: Hi, Per Jason Wang's suggestion, iommufd nesting series[1] is split into "Enable stage-1 translation for emulated device" series and "Enable stage-1 translation for passthrough de

RE: [PATCH v3 00/17] intel_iommu: Enable stage-1 translation for emulated device

2024-09-11 Thread Duan, Zhenzhong
Hi Clement, Thanks for your review. Hoping it could be accepted in the foreseeable future. Thanks Zhenzhong >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v3 00/17] intel_iommu: Enable stage-1 translation for >emulated device > >Hi Zhenzhong, > >Thanks for posting

RE: [PATCH v3 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-09-11 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v3 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 11/09/2024 07:22, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unless this >email comes

RE: [PATCH v2 00/17] intel_iommu: Enable stage-1 translation for emulated device

2024-09-10 Thread Duan, Zhenzhong
Hi Clement, Yes, I'll send a v3 in this week. Thanks Zhenzhong >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v2 00/17] intel_iommu: Enable stage-1 translation for >emulated device > >Hi Zhenzhong, > >Do you plan to post a v3 for this series? > >Thanks > >cmd > >O

RE: [PATCH v4 0/2] intel_iommu minor fixes

2024-09-09 Thread Duan, Zhenzhong
Hi Michael, Kindly ping, seems this small series missed. Thanks Zhenzhong >-Original Message- >From: Duan, Zhenzhong >Subject: [PATCH v4 0/2] intel_iommu minor fixes > >Hi > >Fixes two minor issues in intel iommu. >See patch for details. > >Tested scal

RE: [PATCH v2 13/17] intel_iommu: piotlb invalidation should notify unmap

2024-08-19 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 13/17] intel_iommu: piotlb invalidation should >notify unmap > >On 2024/8/19 17:57, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Liu, Yi L >&

RE: [PATCH v2 13/17] intel_iommu: piotlb invalidation should notify unmap

2024-08-19 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 13/17] intel_iommu: piotlb invalidation should >notify unmap > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> This is used by some emulated devices which caches address >> translation result. When piotlb invalidation issued in gu

RE: [PATCH v2 16/17] intel_iommu: Introduce a property to control FS1GP cap bit setting

2024-08-19 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 16/17] intel_iommu: Introduce a property to control >FS1GP cap bit setting > >On 2024/8/15 11:46, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Liu, Yi

RE: [PATCH v2 08/17] intel_iommu: Set accessed and dirty bits during first stage translation

2024-08-15 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 08/17] intel_iommu: Set accessed and dirty bits >during first stage translation > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> From: Clément Mathieu--Drif >> >> Signed-off-by: Clément Mathieu--Drif >> Signed-off-by: Zhenzhong

RE: [PATCH v2 07/17] intel_iommu: Check if the input address is canonical

2024-08-15 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 07/17] intel_iommu: Check if the input address is >canonical > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> From: Clément Mathieu--Drif >> >> First stage translation must fail if the address to translate is >> not canonical. >

RE: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-08-14 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID- >selective PASID-based iotlb invalidation > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> Per spec 6.5.2.4, PADID-selective PASID-based iotlb invalidation will >> flush stage-2 i

RE: [PATCH v2 16/17] intel_iommu: Introduce a property to control FS1GP cap bit setting

2024-08-14 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 16/17] intel_iommu: Introduce a property to control >FS1GP cap bit setting > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> When host IOMMU doesn't support FS1GP but vIOMMU does, host >IOMMU >> can't translate stage-1 page table

RE: [PATCH v2 14/17] intel_iommu: Set default aw_bits to 48 in scalable modren mode

2024-08-14 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 14/17] intel_iommu: Set default aw_bits to 48 in >scalable modren mode > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> According to VTD spec, stage-1 page table could support 4-level and >> 5-level paging. >> >> However, 5-level

RE: [PATCH v3 2/2] intel_iommu: Make PASID-cache and PIOTLB type invalid in legacy mode

2024-08-13 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v3 2/2] intel_iommu: Make PASID-cache and PIOTLB >type invalid in legacy mode > >On 2024/8/14 10:26, Zhenzhong Duan wrote: >> In vtd_process_inv_desc(), VTD_INV_DESC_PC and VTD_INV_DESC_PIOTLB >are >> bypassed without scalable mod

RE: [PATCH v2 01/17] intel_iommu: Use the latest fault reasons defined by spec

2024-08-13 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v2 01/17] intel_iommu: Use the latest fault reasons >defined by spec > >On 2024/8/5 14:27, Zhenzhong Duan wrote: >> From: Yu Zhang >> >> Spec revision 3.0 or above defines more detailed fault reasons for >> scalable mode. So intr

RE: [PATCH] intel_iommu: Fix invalidation descriptor type field

2024-08-13 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH] intel_iommu: Fix invalidation descriptor type field > >On 2024/8/13 13:53, Zhenzhong Duan wrote: >> According to spec, invalidation descriptor type is 7bits which is >> concatenation of bits[11:9] and bits[3:0] of invalidation de

RE: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-08-12 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 13/08/2024 04:20, Duan, Zhenzhong wrote: >> Caution: External email. Do not open attachments or c

RE: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-08-12 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 08/08/2024 14:31, Duan, Zhenzhong wrote: >> Caution: External email. Do not open attachments or cli

RE: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-08-12 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID- >selective PASID-based iotlb invalidation > > > >On 08/08/2024 14:40, Duan, Zhenzhong wrote: >> Caution: External email. Do not o

Re: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe. Per spec 6.5.2.4, PADID-selective PASID-based iotlb in

Re: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe. Add an new element scalable_mode in IntelIOMMUState to

Re: [PATCH v2 15/17] intel_iommu: Modify x-scalable-mode to be string option to expose scalable modern mode

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:34 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe. From: Yi Liu Intel VT-d 3.0 introduces scalable mode

RE: [PATCH v1 11/17] intel_iommu: Extract device IOTLB invalidation logic

2024-07-24 Thread Duan, Zhenzhong
Sure, thanks for reminding. BRs. Zhenzhong >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 11/17] intel_iommu: Extract device IOTLB >invalidation logic > >Hi Zhenzhong, > >This patch has been merged into staging this morning, be careful when >re-sending your seri

RE: [PATCH v1 17/17] tests/qtest: Add intel-iommu test

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 17/17] tests/qtest: Add intel-iommu test > > > >On 18/07/2024 10:16, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unless this >email comes from a known sender and you kno

RE: [PATCH v1 14/17] intel_iommu: piotlb invalidation should notify unmap

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 14/17] intel_iommu: piotlb invalidation should >notify unmap > > > >On 24/07/2024 07:45, CLEMENT MATHIEU--DRIF wrote: >> Maybe I'm missing something but why do we invalidate device IOTLB >> upon piotlb receipt of a

RE: [PATCH v1 04/17] intel_iommu: Flush stage-2 cache in PADID-selective PASID-based iotlb invalidation

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 04/17] intel_iommu: Flush stage-2 cache in PADID- >selective PASID-based iotlb invalidation > > > >On 24/07/2024 04:59, Duan, Zhenzhong wrote: >> Caution: External email. Do not o

RE: [PATCH v1 04/17] intel_iommu: Flush stage-2 cache in PADID-selective PASID-based iotlb invalidation

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 04/17] intel_iommu: Flush stage-2 cache in PADID- >selective PASID-based iotlb invalidation > > > >On 18/07/2024 10:16, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unles

RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 19/07/2024 05:39, Duan, Zhenzhong wrote: >> Caution: External email. Do not open attachments or c

RE: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke >HostIOMMUDevice::realize() during attach_device() > >On 23/07/2024 08:55, Eric Auger wrote: >> >> >> On 7/23/24 09:44, Cédric Le Goater wrote: >>> On 7/23/24 09:38, Eric Auger wrote: >>

RE: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >On 7/23/24 08:13, Joao Martins wrote: >> On 23/07/2024 06:11, Duan, Zhenzhong wrote: >>> >>> >&

RE: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 06/13] vfio/{iommufd,container}: Remove >caps::aw_bits > >On 22/07/2024 06:22, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >&

RE: [PATCH v6 3/9] vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 3/9] vfio/iommufd: Add hw_caps field to >HostIOMMUDeviceCaps > >Store the value of @caps returned by iommufd_backend_get_device_info() >in a new field HostIOMMUDeviceCaps::hw_caps. Right now the only value is >whether device IOM

RE: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >In preparation to using the dirty tracking UAPI, probe whether the IOMMU >supports dirty tracking. This is done via the data stored in >hiod::caps::hw_caps

RE: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page tracking

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page >tracking > >The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >tracking of VF pre-copy phase of dirty page tracking, though it means >that it will only

RE: [PATCH v6 8/9] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 8/9] vfio/migration: Don't block migration device dirty >tracking is unsupported > >By default VFIO migration is set to auto, which will support live >migration if the migration capability is set *and* also dirty page >tracking

RE: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >1) The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. The process generall

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain >creation > >On 22/07/2024 06:16, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH

RE: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >On 22/07/2024 15:09, Joao Martins wrote: >> On 22/07/2024 09:58, Joao Martins wrote: >>> On 22/07/

RE: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Farman >Subject: Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE >with mdev > >On Mon, 2024-07-22 at 17:36 +0200, Cédric Le Goater wrote: >> On 7/22/24 17:09, Joao Martins wrote: >> > On 22/07/2024 15:57, Eric Farman wrote: >> > > On Mon, 2024

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain >creation > >On 7/22/24 10:50, Joao Martins wrote: >> On 22/07/2024 06:16, Duan, Zhenzhong wrote: >>>> -Original Message- >>&

RE: [PATCH] hw/vfio/container: Fix SIGSEV on vfio_container_instance_finalize()

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH] hw/vfio/container: Fix SIGSEV on >vfio_container_instance_finalize() > >In vfio_connect_container's error path, the base container is >removed twice form the VFIOAddressSpace QLIST: first on the >listener_release_exit label and sec

RE: [PATCH v5 11/13] vfio/iommufd: Implement VFIOIOMMUClass::query_dirty_bitmap support

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 11/13] vfio/iommufd: Implement >VFIOIOMMUClass::query_dirty_bitmap support > >ioctl(iommufd, IOMMU_HWPT_GET_DIRTY_BITMAP, arg) is the UAPI >that fetches the bitmap that tells what was dirty in an IOVA >range. > >A single bitmap

RE: [PATCH v5 10/13] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 10/13] vfio/iommufd: Implement >VFIOIOMMUClass::set_dirty_tracking support > >ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that >enables or disables dirty page tracking. The ioctl is used if the hwpt >has been

RE: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >In preparation to using the dirty tracking UAPI, probe whether the IOMMU >supports dirty tracking. This is done via the data stored in >hiod::caps::hw_ca

RE: [PATCH v5 08/13] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 08/13] vfio/{iommufd,container}: Invoke >HostIOMMUDevice::realize() during attach_device() > >Move the HostIOMMUDevice::realize() to be invoked during the attach of >the device >before we allocate IOMMUFD hardware pagetable obje

RE: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits > >Remove caps::aw_bits which requires the bcontainer::iova_ranges being >initialized after device is actually attached. Instead defer that to >.get_cap() and call vfio_devic

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >1) The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. The process genera

RE: [PATCH v5 01/13] vfio/pci: Extract mdev check into an helper

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Sent: Friday, July 19, 2024 8:05 PM >To: qemu-devel@nongnu.org >Cc: Liu, Yi L ; Eric Auger ; Duan, >Zhenzhong ; Alex Williamson >; Cedric Le Goater ; Jason >Gunthorpe ; Avihai Horon ; Joao >Martins >Subject: [PAT

RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Duan, Zhenzhong] >Subject: RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >>-Original Message- >>From: Liu, Yi L >>Subject: Re: [PATCH v1 03/17] intel_iommu: Add a pla

RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > >On 2024/7/19 10:47, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: CLEMENT

RE: [PATCH v1 16/17] intel_iommu: Modify x-scalable-mode to be string option

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 16/17] intel_iommu: Modify x-scalable-mode to be >string option > > > >On 18/07/2024 10:16, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unless this >email comes from a k

RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 18/07/2024 10:16, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unless this >email comes

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 18/07/2024 08:44, Duan, Zhenzhong wrote: >>>>>> If existing hwpt doesn't support dirty tracking. >>>>>>

RE: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking > >On 16/07/2024 09:20, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subjec

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 17/07/2024 11:05, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Joao Martins >>> Subject: Re:

RE: [PATCH v4 11/12] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 11/12] vfio/migration: Don't block migration device >dirty tracking is unsupported > >On 17/07/2024 03:38, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-17 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 17/07/2024 03:18, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>&g

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-17 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 17/07/2024 03:52, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> S

RE: [PATCH 3/6] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices

2024-07-17 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH 3/6] virtio-iommu: Free [host_]resv_ranges on >unset_iommu_devices > >Hi Zhenzhong, > >On 7/17/24 05:06, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Au

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-07-16 Thread Duan, Zhenzhong
iommu: Use the latest fault reasons defined by >spec > >Hi Michael, Jason, > >On 2024/5/28 11:03, Jason Wang wrote: >> On Mon, May 27, 2024 at 2:50 PM Michael S. Tsirkin >wrote: >>> >>> On Mon, May 27, 2024 at 06:44:58AM +, Duan, Zhenzhong wrote: >>

RE: [PATCH 3/6] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH 3/6] virtio-iommu: Free [host_]resv_ranges on >unset_iommu_devices > >We are currently missing the deallocation of the [host_]resv_regions >in case of hot unplug. Also to make things more simple let's rule >out the case where multip

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 16/07/2024 17:44, Joao Martins wrote: >> On 16/07/2024 17:04, Eric Auger wrote: >>> Hi Joao, >>> >>> On 7/12/24 13:46, Joao Martins wrote: There's generally two

RE: [PATCH v4 11/12] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 11/12] vfio/migration: Don't block migration device dirty >tracking is unsupported > >By default VFIO migration is set to auto, which will support live >migration if the migration capability is set *and* also dirty page >tracki

RE: [PATCH v4 09/12] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 09/12] vfio/iommufd: Implement >VFIOIOMMUClass::set_dirty_tracking support > >ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that >enables or disables dirty page tracking. It is used if the hwpt >has been create

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >* The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. It generally create

RE: [PATCH v4 07/12] vfio/{iommufd,container}: Initialize HostIOMMUDeviceCaps during attach_device()

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 07/12] vfio/{iommufd,container}: Initialize >HostIOMMUDeviceCaps during attach_device() > >Fetch IOMMU hw raw caps behind the device and thus move the >HostIOMMUDevice::realize() to be done during the attach of the device. It >a

RE: [PATCH v4 04/12] vfio/iommufd: Return errno in iommufd_cdev_attach_ioas_hwpt()

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 04/12] vfio/iommufd: Return errno in >iommufd_cdev_attach_ioas_hwpt() > >In preparation to implement auto domains have the attach function >return the errno it got during domain attach instead of a bool. > >-EINVAL is tracked t

RE: [PATCH v4 02/12] vfio/iommufd: Don't initialize nor set a HOST_IOMMU_DEVICE with mdev

2024-07-16 Thread Duan, Zhenzhong
Hello Joao, >-Original Message- >From: Joao Martins >Subject: [PATCH v4 02/12] vfio/iommufd: Don't initialize nor set a >HOST_IOMMU_DEVICE with mdev > >mdevs aren't "physical" devices and when asking for backing IOMMU info, it >fails the entire provisioning of the guest. Fix that by skipp

RE: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-16 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking > >This small series adds support for IOMMU dirty tracking support via the >IOMMUFD backend. The hardware capability is available on most recent x86 >hardware. The series is divided orga

RE: [PATCH v3 00/10] hw/vfio: IOMMUFD Dirty Tracking

2024-07-11 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v3 00/10] hw/vfio: IOMMUFD Dirty Tracking > >On 11/07/2024 08:41, Cédric Le Goater wrote: >> Hello Joao, >> >> On 7/8/24 4:34 PM, Joao Martins wrote: >>> This small series adds support for IOMMU dirty tracking support via the >

RE: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page tracking

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 10/10] vfio/common: Allow disabling device dirty page >tracking > >The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >tracking of VF pre-copy phase of dirty page tracking, though it means >that it will on

RE: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 09/10] vfio/migration: Don't block migration device dirty >tracking is unsupported > >By default VFIO migration is set to auto, which will support live >migration if the migration capability is set *and* also dirty page >tracki

RE: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-10 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >IOMMU_GET_HW_INFO failure > >On 10/07/2024 03:53, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From:

RE: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-09 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >IOMMU_GET_HW_INFO failure > >On 09/07/2024 12:45, Joao Martins wrote: >> On 09/07/2024 09:56, Joao Martins wrote: >>> On 09/07/2024 04:4

RE: [PATCH RFCv1 02/10] hw/arm/virt: Add iommufd link to virt-machine

2024-07-09 Thread Duan, Zhenzhong
Hi Nicolin, >-Original Message- >From: Nicolin Chen >Subject: Re: [PATCH RFCv1 02/10] hw/arm/virt: Add iommufd link to virt- >machine > >On Tue, Jul 09, 2024 at 07:06:50PM +0200, Eric Auger wrote: >> On 7/9/24 18:59, Nicolin Chen wrote: >> > Hi Eric, >> > >> > Thanks for the comments! >>

RE: [PATCH v3 04/10] vfio/iommufd: Introduce auto domain creation

2024-07-08 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 04/10] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >* The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. It generally create

RE: [PATCH v3 02/10] backends/iommufd: Extend iommufd_backend_get_device_info() to fetch HW capabilities

2024-07-08 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v3 02/10] backends/iommufd: Extend >iommufd_backend_get_device_info() to fetch HW capabilities > >The helper will be able to fetch vendor agnostic IOMMU capabilities >supported both by hardware and software. Right now it is only i

RE: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on IOMMU_GET_HW_INFO failure

2024-07-08 Thread Duan, Zhenzhong
Hi Joao, >-Original Message- >From: Joao Martins >Subject: [PATCH v3 01/10] vfio/iommufd: Don't fail to realize on >IOMMU_GET_HW_INFO failure > >mdevs aren't "physical" devices and when asking for backing IOMMU info, it >fails the entire provisioning of the guest. Fix that by filling caps

RE: [PATCH v3 3/3] intel_iommu: make types match

2024-07-05 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: [PATCH v3 3/3] intel_iommu: make types match > >From: Clément Mathieu--Drif > >The 'level' field in vtd_iotlb_key is an unsigned integer. >We don't need to store level as an int in vtd_lookup_iotlb. > >Signed-off-by: Clément Mat

RE: [PATCH v3 1/3] intel_iommu: fix FRCD construction macro.

2024-07-05 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: [PATCH v3 1/3] intel_iommu: fix FRCD construction macro. > >From: Clément Mathieu--Drif > >The constant must be unsigned, otherwise the two's complement >overrides the other fields when a PASID is present. > >Fixes: 1b2b12376c8a

RE: [PATCH v3 2/3] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo

2024-07-05 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: [PATCH v3 2/3] intel_iommu: fix type of the mask field in >VTDIOTLBPageInvInfo > >From: Clément Mathieu--Drif > >VTDIOTLBPageInvInfo.mask might not fit in an uint8_t. >Moreover, this field is used in binary operations with 64-bi

RE: [PATCH v2 5/7] virtio-iommu : Retrieve page size mask on virtio_iommu_set_iommu_device()

2024-07-01 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v2 5/7] virtio-iommu : Retrieve page size mask on >virtio_iommu_set_iommu_device() > >Retrieve the Host IOMMU Device page size mask when this latter is set. >This allows to get the information much sooner than when relying on >IOMMU

Re: [PATCH 1/2] vfio/display: Fix potential memleak of edid info

2024-06-30 Thread Duan, Zhenzhong
Hi, On 6/29/2024 8:15 PM, Marc-André Lureau wrote: Hi On Fri, Jun 28, 2024 at 1:32 PM Zhenzhong Duan wrote: EDID related device region info is leaked in three paths: 1. In vfio_get_dev_region_info(), when edid info isn't find, the last device region info is leaked. 2. In vfi

RE: [PATCH 5/7] virtio-iommu : Retrieve page size mask on virtio_iommu_set_iommu_device()

2024-06-27 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: [PATCH 5/7] virtio-iommu : Retrieve page size mask on >virtio_iommu_set_iommu_device() > >Retrieve the Host IOMMU Device page size mask when this latter is set. >This allows to get the information much sooner than when relying on >I

RE: [PATCH 4/7] HostIOMMUDevice: Introduce get_page_size_mask() callback

2024-06-27 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH 4/7] HostIOMMUDevice: Introduce >get_page_size_mask() callback > >Hi Zhenzhong, > >On 6/27/24 05:06, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message-

RE: [PATCH 4/7] HostIOMMUDevice: Introduce get_page_size_mask() callback

2024-06-26 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: [PATCH 4/7] HostIOMMUDevice: Introduce get_page_size_mask() >callback > >This callback will be used to retrieve the page size mask supported >along a given Host IOMMU device. > >Signed-off-by: Eric Auger >--- > include/hw/vfio/vfio

RE: [PATCH v4 0/8] VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling for hotplugged devices

2024-06-17 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v4 0/8] VIRTIO-IOMMU/VFIO: Fix host iommu geometry >handling for hotplugged devices > >This series is based on Zhenzhong HostIOMMUDevice: > >[PATCH v7 00/17] Add a host IOMMU device abstraction to check with >vIOMMU >https://lore.ke

  1   2   3   4   5   6   >