Hi Zhenzhong,

On 2/28/25 9:16 AM, Duan, Zhenzhong wrote:
>
>> -----Original Message-----
>> From: Eric Auger <eric.au...@redhat.com>
>> Subject: Re: [PATCH rfcv2 03/20] HostIOMMUDevice: Introduce realize_late
>> callback
>>
>>
>>
>>
>> On 2/19/25 9:22 AM, Zhenzhong Duan wrote:
>>> Currently we have realize() callback which is called before attachment.
>>> But there are still some elements e.g., hwpt_id is not ready before
>>> attachment. So we need a realize_late() callback to further initialize
>>> them.
> >from the description it is not obvious why the realize() could not have
>> been called after the attach. Could you remind the reader what is the
>> reason?
> Sure, will rephrase as below:
>
> " HostIOMMUDevice provides some elements to vIOMMU, but there are some which
> are ready after attachment, e.g., hwpt_id.
>
> Before create and attach to a new hwpt with IOMMU dirty tracking capability,
> we have to call realize() to get if hardware IOMMU supports dirty tracking
> capability.
>
> So moving realize() after attach() will not work here, we need a new callback
> realize_late() to further initialize those elements.
>
> Currently, this callback is only useful for iommufd backend. For legacy
> backend nothing needs to be initialized after attachment. "

OK this helps me

Thanks

Eric
>
> Thanks
> Zhenzhong
>


Reply via email to