Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2002320ybh; Fri, 24 Jul 2020 01:48:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHaLk18+zHh0zGzzDxga+eAe2VMH0ltp1cOZAbT0g3zoxOnxtfBlmQThky8JITXdEP1VrC X-Received: by 2002:a50:afa2:: with SMTP id h31mr8030340edd.303.1595580520333; Fri, 24 Jul 2020 01:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595580520; cv=none; d=google.com; s=arc-20160816; b=GiTl7V5W3TrbswXtky6rdPTng/5qjdsZObZvb/yBL+gveZzEFJPga8h4Bp2z6pYO14 bAljfE2jcZJzEKWOOH3XM+rAbneJeukFsHhXmMYgXkDYRMLId08+ALfnL3aL5pDh7C8N C+5jsj1YxWXPi5o9goxgOuLZz41IS+t5Aai2YltiNkRvFmpD3StrMuub2fAIb3jkgEty y+VtJ7+vhot0XHT0tlSOzUL8n88SZJGvyFpjHLGruQqSKCAtHaRWI/VPCJqZJc4zAHJt m+m1vZprDarQGWLWKaswqPAVE7QtoDlxP2bGUJfRNRpl+rsJaKu6f/wyK7Zh5KWtGkm7 1z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=dXzedUlkwBpnCz1UcfpruifIE767I+Sa0bzFij3SzJc=; b=jcIF9HOhOCqpy1bvQ75jQiyC24gkkPG6zriPurfYayrE38F+CNpS1uSBA3LhH6TuID S3wVLaK0Q45VrWKPtRijDctY3wJDicTacqb5aL8bemVhT9DeKoYXXZaII0DL7aNjz99I aVdw/J0/Wq1ObCKOfX8p9lbUzBsuuAjw7PUD6Qshlxn3OJRn99z3bnk7w+ud9mJE9gT+ v0c/EOnyDzg6nWAziXBK2O4rLyPZPa3zSx6sa3NJjgnDB/PqfJ/JnZBuR57BFKzDFdZ+ BNPo98y+FyvTto2xwTSqxwNTFaZ4RgOXzWojGRts+FwQ2f6TB3juTfwvcTX0zHSf1lRi psDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr17si244204ejc.520.2020.07.24.01.48.16; Fri, 24 Jul 2020 01:48:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbgGXIsK (ORCPT + 99 others); Fri, 24 Jul 2020 04:48:10 -0400 Received: from mga02.intel.com ([134.134.136.20]:45604 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbgGXIsJ (ORCPT ); Fri, 24 Jul 2020 04:48:09 -0400 IronPort-SDR: sH6rwSAxZ1rS5Gvp09MhgJ+hBfsY/Jiulsyzzv04BQ+5NStcQtKtHTx+XR1EIUZHnP3Q+Uxas6 F5B8HltMKMvw== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="138742736" X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="138742736" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 01:48:09 -0700 IronPort-SDR: +Un+cSduj96ujc+RzGWhAE9vgnycKNK++XQWrcgHivKYO1MueFnzcalUZFyGf87nATYpUZltb8 r1MhhKa+Uuyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="311335253" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by fmsmga004.fm.intel.com with ESMTP; 24 Jul 2020 01:48:05 -0700 From: Giovanni Cabiddu To: alex.williamson@redhat.com, herbert@gondor.apana.org.au Cc: cohuck@redhat.com, nhorman@redhat.com, vdronov@redhat.com, bhelgaas@google.com, mark.a.chambers@intel.com, gordon.mcfadden@intel.com, ahsan.atta@intel.com, fiona.trahe@intel.com, qat-linux@intel.com, kvm@vger.kernel.org, linux-crypto@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Giovanni Cabiddu Subject: [PATCH v4 0/5] vfio/pci: add denylist and disable qat Date: Fri, 24 Jul 2020 09:47:55 +0100 Message-Id: <20200724084800.6136-1-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset defines a denylist of devices in the vfio-pci module and adds the current generation of Intel(R) QuickAssist devices to it as they are not designed to run in an untrusted environment. By default, if a device is in the denylist, the probe of vfio-pci fails. If a user wants to use a device in the denylist, he needs to disable the full denylist providing the option disable_denylist=1 at the load of vfio-pci or specifying that parameter in a config file in /etc/modprobe.d. This series also moves the device ids definitions present in the qat driver to linux/pci_ids.h since they will be shared between the vfio-pci and the qat drivers and replaces the custom ADF_SYSTEM_DEVICE macro with PCI_VDEVICE. The series is applicable to Herbert's tree. Patches 1 to 3 apply also to Alex's tree (next). Patches 4 and 5 are optional and can be applied at a later stage. Changes from v3: - Patch #1: included Acked-by tag, after ack from Bjorn Helgaas - Patch #2: s/prevents/allows/ in module parameter description Changes from v2: - Renamed blocklist in denylist - Patch #2: reworded module parameter description to clarify why a device is in the denylist - Patch #2: reworded warning that occurs when denylist is enabled and device is present in that list Changes from v1: - Reworked commit messages: Patches #1, #2 and #3: capitalized first character after column to comply to subject line convention Patch #3: Capitalized QAT acronym and added link and doc number for document "IntelĀ® QuickAssist Technology (IntelĀ® QAT) Software for Linux" Giovanni Cabiddu (5): PCI: Add Intel QuickAssist device IDs vfio/pci: Add device denylist vfio/pci: Add QAT devices to denylist crypto: qat - replace device ids defines crypto: qat - use PCI_VDEVICE drivers/crypto/qat/qat_c3xxx/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c62x/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 11 ++--- .../crypto/qat/qat_common/adf_accel_devices.h | 6 --- drivers/crypto/qat/qat_common/qat_hal.c | 7 +-- drivers/crypto/qat/qat_common/qat_uclo.c | 9 ++-- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 11 ++--- drivers/vfio/pci/vfio_pci.c | 48 +++++++++++++++++++ include/linux/pci_ids.h | 6 +++ 11 files changed, 87 insertions(+), 55 deletions(-) -- 2.26.2