On 4/7/26 04:18, Duan, Zhenzhong wrote:
>
>
>> -----Original Message-----
>> From: Cédric Le Goater <clg@redhat.com>
>> Subject: Re: [PATCH v3 14/14] intel_iommu: Expose flag
>> VIOMMU_FLAG_PASID_SUPPORTED when configured
>>
>> On 4/3/26 05:55, Zhenzhong Duan wrote:
>>> VFIO device will check flag VIOMMU_FLAG_PASID_SUPPORTED and expose
>> PASID
>>> capability, or else guest could not enable PASID of this device even if
>>> vIOMMU's pasid is configured.
>>>
>>> This is the final knob to enable PASID.
>>>
>>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>>> Tested-by: Xudong Hao <xudong.hao@intel.com>
>>> ---
>>> hw/i386/intel_iommu.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
>>> index abcb0df5d9..3cb8a547c7 100644
>>> --- a/hw/i386/intel_iommu.c
>>> +++ b/hw/i386/intel_iommu.c
>>> @@ -4794,6 +4794,7 @@ static uint64_t vtd_get_viommu_flags(void *opaque)
>>> uint64_t flags;
>>>
>>> flags = s->fsts ? VIOMMU_FLAG_WANT_NESTING_PARENT : 0;
>>> + flags |= s->pasid ? VIOMMU_FLAG_PASID_SUPPORTED : 0;
>>
>> The '|=' operator is unexpected.
>
> Not get, do you see any issue here?
>
> The flags is firstly assigned to VIOMMU_FLAG_WANT_NESTING_PARENT if s->fsts=true,
> Then VIOMMU_FLAG_PASID_SUPPORTED is appended if s->pasid=true.
My eyes/brain tricked me. I was "seeing" a line removal just
above this additional line ... sorry for the noise.
Thank,
C.