From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3CF2459AC; Mon, 16 Sep 2024 11:30:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACCAF4025F; Mon, 16 Sep 2024 11:30:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 9B52340041 for ; Mon, 16 Sep 2024 11:30:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726479049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iud92njRRH8Nbp1AcPSeRLqQzftQqPY/GKuvn8HTkHc=; b=cI/ZEb0aHletTAf/6fBjFzC8WmbONjRR8WvC8tMqrbw/FZwrPY1y1vY4KciQrAVD6JcHVx KTXyfuLWjsipGRnKziyszDsMpv1X0AQ3SpuATuSx3ffN8OC0HtDBgGronzr46f/dT7kJj4 gY3/ivahQZY0qGz0+ua7yapARMd+UmY= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-eBmtBrkuMP2gMyXeu_gaaA-1; Mon, 16 Sep 2024 05:30:47 -0400 X-MC-Unique: eBmtBrkuMP2gMyXeu_gaaA-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2f759001c2fso13734631fa.0 for ; Mon, 16 Sep 2024 02:30:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726479046; x=1727083846; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iud92njRRH8Nbp1AcPSeRLqQzftQqPY/GKuvn8HTkHc=; b=KI9t5PWyqsfwkIfEy4xFWX8nnBHSB6JhQvTx/gpAlwmwwesbHOQlqoxzuXcy5uEzql UrLEGBJx8rs7tL4vtmRuoalMUlGMVIbJ88Pdzu7Fu7DfImI/N3qWrjE4rOZYVgN48eHW wKG4Rrbf+zZj1m66SGjtc51ZEqY5fCvh7ttNkg91htRKlKNPMwTD/OdZHDx8wPGSbWpu YEBX82+aXDSBf05cvEhZmq3l+c3tbo6lx4gOE/2KC8zLP0GVBb9Q6q6dAttIpGvltUkc ZYfquSmwz++RxYq0Z4//my6zPbVmVRase1cFAQzkftcQ9KQRjygTVL9fb3pfvF1KQ4sb kNUA== X-Gm-Message-State: AOJu0YxS++/eBAIChyhYmD9tkEBS0AP0wxi9AwFUrBx3fpHq4vMl1uvn d98sHqeixR49AXd2TqXITRAQ0ag00fxFAxF5cqz/73hhhP3ktV115K9GLoJrk6X8NickUqg3Nnw ygS0Q6/orebG2vJwel8zkuX0BXzkES9IB0di61RRNHacmZC+Uz2I+0rsbv6zs5gaK1swQFMU3i0 zV7vTMr11kf/bPLEQ= X-Received: by 2002:a05:651c:19a5:b0:2f7:5900:1a2e with SMTP id 38308e7fff4ca-2f7918e08b7mr49430321fa.3.1726479046231; Mon, 16 Sep 2024 02:30:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGv9rL3Jl+pnMpX9/auTWXdrSS3y3a2YhwtOpfJMNKM/vBBf1OKV8XYzH24dnrAJh6lEoIQsOI33gpFP1Vf2hg= X-Received: by 2002:a05:651c:19a5:b0:2f7:5900:1a2e with SMTP id 38308e7fff4ca-2f7918e08b7mr49430101fa.3.1726479045660; Mon, 16 Sep 2024 02:30:45 -0700 (PDT) MIME-Version: 1.0 References: <20240916041409.181259-1-probb@iol.unh.edu> <20240916041409.181259-2-probb@iol.unh.edu> In-Reply-To: <20240916041409.181259-2-probb@iol.unh.edu> From: David Marchand Date: Mon, 16 Sep 2024 11:30:34 +0200 Message-ID: Subject: Re: [PATCH 1/1] tests/cryptodev_common.py Supporting vfio denylist for QAT To: Patrick Robb Cc: dts@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org On Mon, Sep 16, 2024 at 6:15=E2=80=AFAM Patrick Robb wr= ote: > > 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 > --- > 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=3D"igb_uio"): > > if "crypto_dev_id" in conf.suite_cfg: > dev_id =3D 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; mod= probe -r vfio_pci; modprobe -r vfio_virqfd; modprobe -r vfio', '# ', 5) > + test_case.dut.send_expect('modprobe vfio-pci disable_denylis= t=3D1 enable_sriov=3D1', '# ', 5) While I do understand the disable_denylist option, the enable_sriov=3D part seems a different topic... Why is sriov needed in this test? > + test_case.dut.send_expect('echo "1" | tee /sys/module/vfio/p= arameters/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 > --=20 David Marchand