>-----Original Message-----
>From: Liu, Yi L <yi.l....@intel.com>
>Subject: Re: [PATCH v5 16/21] intel_iommu: Replay pasid bindings after
>context cache invalidation
>
>On 2025/8/28 17:43, Eric Auger wrote:
>>
>>
>> On 8/22/25 8:40 AM, Zhenzhong Duan wrote:
>>> From: Yi Liu <yi.l....@intel.com>
>>>
>>> This replays guest pasid bindings after context cache invalidation.
>>> This is a behavior to ensure safety. Actually, programmer should issue
>>> pasid cache invalidation with proper granularity after issuing a context
>>> cache invalidation.
>> So is this mandated? If the spec mandates specific invalidations and the
>> guest does not comply with the expected invalidation sequence shall we
>> do that behind the curtain?
>
>I think this is following the below decision. We can discuss if it's
>really needed to replay the pasid bind.
>
>d4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2321)
>     /*
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2322)      * From VT-d spec 6.5.2.1, a global context entry invalidation
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2323)      * should be followed by a IOTLB global invalidation, so we
>should
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2324)      * be safe even without this. Hoewever, let's replay the region as
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2325)      * well to be safer, and go back here when we need finer tunes
>for
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2326)      * VT-d emulation codes.
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2327)      */
>dd4d607e40d (Peter Xu                     2017-04-07 18:59:15 +0800
>2328)     vtd_iommu_replay_all(s);

I have tested this series with this patch reverted, it works with guest linux 
kernel.

Personally, I am inclined to stop adding workaround for guest kenrel bug, there 
will be more and more over time and it makes current code complex 
unnecessarily. @Eric, @Liu, Yi L your thought?

Thanks
Zhenzhong

Reply via email to