lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231024084124.11155-2-jiaqing.huang@intel.com>
Date:   Tue, 24 Oct 2023 01:41:24 -0700
From:   Huang Jiaqing <jiaqing.huang@...el.com>
To:     joro@...tes.org, will@...nel.org, robin.murphy@....com,
        dwmw2@...radead.org, baolu.lu@...ux.intel.com,
        linux-kernel@...r.kernel.org, iommu@...ts.linux.dev
Cc:     jacob.jun.pan@...ux.intel.com, kevin.tian@...el.com,
        yi.y.sun@...el.com, kvm@...r.kernel.org, jiaqing.huang@...el.com
Subject: [PATCH 2/2] iommu/vt-d: Adopt new helper for looking up pci device

Adopt the new iopf_queue_find_pdev func() to look up PCI device
for better efficiency and avoid the CPU stuck issue with parallel
heavy dsa_test.

Signed-off-by: Huang Jiaqing <jiaqing.huang@...el.com>
---
 drivers/iommu/intel/svm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 659de9c16024..0f1018b76557 100644
--- a/drivers/iommu/intel/svm.c
+++ b/drivers/iommu/intel/svm.c
@@ -672,7 +672,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)
 		if (unlikely(req->lpig && !req->rd_req && !req->wr_req))
 			goto prq_advance;
 
-		pdev = pci_get_domain_bus_and_slot(iommu->segment,
+		pdev = iopf_queue_find_pdev(iommu->iopf_queue,
 						   PCI_BUS_NUM(req->rid),
 						   req->rid & 0xff);
 		/*
@@ -688,7 +688,6 @@ static irqreturn_t prq_event_thread(int irq, void *d)
 			trace_prq_report(iommu, &pdev->dev, req->qw_0, req->qw_1,
 					 req->priv_data[0], req->priv_data[1],
 					 iommu->prq_seq_number++);
-		pci_dev_put(pdev);
 prq_advance:
 		head = (head + sizeof(*req)) & PRQ_RING_MASK;
 	}
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ