From: David Marchand <david.marchand@redhat.com>
To: Patrick Robb <probb@iol.unh.edu>
Cc: dts@dpdk.org
Subject: Re: [PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT
Date: Mon, 16 Sep 2024 11:30:34 +0200 [thread overview]
Message-ID: <CAJFAV8x_HxjzGcAL4r0SaGCGDRn04nA2m6uV+JXU_BSk7GcbnA@mail.gmail.com> (raw)
In-Reply-To: <20240916041409.181259-2-probb@iol.unh.edu>
On Mon, Sep 16, 2024 at 6:15 AM Patrick Robb <probb@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@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
next prev parent reply other threads:[~2024-09-16 9:30 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 ` [PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT Patrick Robb
2024-09-16 9:30 ` David Marchand [this message]
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=CAJFAV8x_HxjzGcAL4r0SaGCGDRn04nA2m6uV+JXU_BSk7GcbnA@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dts@dpdk.org \
--cc=probb@iol.unh.edu \
/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).