Compare commits

...

2 Commits

Author SHA1 Message Date
Linus Torvalds
d92b86f672 IOMMU Fix for Linux v6.1-rc8
Including:
 
 	- Fix device mask to catch all affected devices in the recently added
 	  quirk for QAT devices in the Intel VT-d driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmOV37AACgkQK/BELZcB
 GuMmgA/9Ec7btTVq/o6Hk3Hf/F5qSprOptTmKxVli7ta2ReVbjcZEi0g8hPiDUGU
 Uog4Abl5ndP/JixkKBRY3m5ypL2Y8Ip/KEjDF9uEHPTYK22JklMa9OZAOby+eu+h
 cPon0RKVUfEmrtxoCpFc1w/38V5LJq9QoDgLWvyoL9HBjdrX/DQ4WU4EVVAbW1DQ
 XqbyCeksLUJCg+it3593KXKbWdT8lVkiB2lk8R5Q8oPzGeai4g+gy6waXDw+yYty
 8jhC2TPNTHpgT0GMONr9hswN7wOjlboGlifgo23iCuDdvtdwklcIBFn8H9IGhqGH
 dPJmiN6+r9YKQ2IrQyXXjx5ZrxXT2VGxxIangbuImfhfdxKnr9smHrjGL65TIcbl
 eGXPt38gDoMPaMXqMMHia0DFZZPjW8yrqFRclDrUjBM1Kd1D5k/UKidHMfRuGFFj
 WrekHmcsAeoom1TtR763BpJGfRqemWa/Y/kFp0OivYqeLa0BjdpqiKlC4hyTraAa
 fCSIr39XsX0oeBDvkIPkfFrbp/u1no+xIj2qlb2YPwWQL4E0HUstmK9ahJez4hyq
 tMxf6Mu5om0EZ/mWLSEfNTcaCvFmTUXk2cwLxzyXSVK8hqKAbHj3D2b+bPEgX9Qe
 izk8pY5+oqBm2OkOTfgFDuJ/ydL0WmHhqH51NlqRvsFMmSB2Y1Q=
 =EMo5
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fix-v6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fix from Joerg Roedel:

 - Fix device mask to catch all affected devices in the recently added
   quirk for QAT devices in the Intel VT-d driver.

* tag 'iommu-fix-v6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Fix buggy QAT device mask
2022-12-11 09:49:39 -08:00
Jacob Pan
81c95fbaeb iommu/vt-d: Fix buggy QAT device mask
Impacted QAT device IDs that need extra dtlb flush quirk is ranging
from 0x4940 to 0x4943. After bitwise AND device ID with 0xfffc the
result should be 0x4940 instead of 0x494c to identify these devices.

Fixes: e65a6897be ("iommu/vt-d: Add a fix for devices need extra dtlb flush")
Reported-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Link: https://lore.kernel.org/r/20221203005610.2927487-1-jacob.jun.pan@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2022-12-05 14:27:03 +01:00

View File

@ -1402,7 +1402,7 @@ static void domain_update_iotlb(struct dmar_domain *domain)
* check because it applies only to the built-in QAT devices and it doesn't
* grant additional privileges.
*/
#define BUGGY_QAT_DEVID_MASK 0x494c
#define BUGGY_QAT_DEVID_MASK 0x4940
static bool dev_needs_extra_dtlb_flush(struct pci_dev *pdev)
{
if (pdev->vendor != PCI_VENDOR_ID_INTEL)