[PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT
David Marchand
david.marchand at redhat.com
Mon Sep 16 11:30:34 CEST 2024
On Mon, Sep 16, 2024 at 6:15 AM Patrick Robb <probb at iol.unh.edu> wrote:
>
> 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.
For interested parties, here is the kernel commit:
https://git.kernel.org/linus/50173329c8cc
I am not entirely confident with this patch, for the reasons below.
>
> Signed-off-by: Patrick Robb <probb at 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"]:
Usually, PCI ids are represented on 4 chars, leading 0 included, so I
would expect 0435.
Do you have such hw and did you test with it?
> + 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)
While I do understand the disable_denylist option, the enable_sriov=
part seems a different topic...
Why is sriov needed in this test?
> + test_case.dut.send_expect('echo "1" | tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode', '# ', 5)
This helps in systems that do not have a IOMMU (or an emulated one for
virtual machines).
I suspect forcing noiommu will break setups with a hw iommu as DPDK
will force PA when noiommu is detected.
> test_case.logger.info(
> "specified the qat hardware device id in cfg: {}".format(dev_id)
> )
> --
> 2.25.1
>
--
David Marchand
More information about the dts
mailing list