test suite reviews and discussions
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: david.marchand@redhat.com
Cc: dts@dpdk.org, Patrick Robb <probb@iol.unh.edu>
Subject: [PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT
Date: Mon, 16 Sep 2024 00:14:09 -0400	[thread overview]
Message-ID: <20240916041409.181259-2-probb@iol.unh.edu> (raw)
In-Reply-To: <20240916041409.181259-1-probb@iol.unh.edu>

DH895XCC, C3XXX, and C62X QuickAssist cards are not designed to run
in an untrusted environment. Consequently, this patch adds commands
to the cryptodev_perf testsuite for loading the vfio driver
with disable_denylist enabled and enabling unsame iommu mode.

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 tests/cryptodev_common.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py
index b550b46869df..37483c51e3e7 100644
--- a/tests/cryptodev_common.py
+++ b/tests/cryptodev_common.py
@@ -15,6 +15,10 @@ def bind_qat_device(test_case, driver="igb_uio"):
 
     if "crypto_dev_id" in conf.suite_cfg:
         dev_id = conf.suite_cfg["crypto_dev_id"]
+        if dev_id in ["37c8", "435", "19e2"]:
+            test_case.dut.send_expect('modprobe -r vfio_iommu_type1; modprobe -r vfio_pci; modprobe -r vfio_virqfd; modprobe -r vfio', '# ', 5)
+            test_case.dut.send_expect('modprobe vfio-pci disable_denylist=1 enable_sriov=1', '# ', 5)
+            test_case.dut.send_expect('echo "1" | tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode', '# ', 5)
         test_case.logger.info(
             "specified the qat hardware device id in cfg: {}".format(dev_id)
         )
-- 
2.25.1


  reply	other threads:[~2024-09-16  4:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16  4:14 [PATCH 0/1] Adding vfio load params for certain QAT cards Patrick Robb
2024-09-16  4:14 ` Patrick Robb [this message]
2024-09-16  9:30   ` [PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT David Marchand
2024-09-17  4:21     ` Patrick Robb
2024-09-18  9:57       ` Juraj Linkeš

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240916041409.181259-2-probb@iol.unh.edu \
    --to=probb@iol.unh.edu \
    --cc=david.marchand@redhat.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).