intel_iommu: Fix PASID validity check in fault reporting
The current code incorrectly uses "pasid != PCI_NO_PASID" to determine if PASID should be reported in fault records. However, this check happens after the code converts PCI_NO_PASID to PASID_0 in scalable mode. This means that for requests that originally had PCI_NO_PASID, the check "pasid != PCI_NO_PASID" will incorrectly return true (since pasid is now PASID_0), causing fault records to incorrectly indicate PASID validity. According to the VT-d specification, the PASID field in fault records is only valid for Requests-with-PASID: "When Set, indicates the faulted request has a PASID TLP Prefix." Fix this by capturing the original PASID state before the PCI_NO_PASID to PASID_0 conversion, ensuring fault records correctly reflect whether the original request had a PASID. Fixes: 1b2b12376c8a ("intel_iommu: process PASID-based iotlb invalidation") Suggested-by: Yi Liu <yi.l.liu@intel.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260527054658.1021096-9-zhenzhong.duan@intel.com> Reviewed-by: Clement Mathieu--Drif <clement.mathieu--drif@bull.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>