Message ID | 20211206015903.88687-9-baolu.lu@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29E8EC433FE for <kvm@archiver.kernel.org>; Mon, 6 Dec 2021 02:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232718AbhLFCDw (ORCPT <rfc822;kvm@archiver.kernel.org>); Sun, 5 Dec 2021 21:03:52 -0500 Received: from mga14.intel.com ([192.55.52.115]:3360 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232605AbhLFCDu (ORCPT <rfc822;kvm@vger.kernel.org>); Sun, 5 Dec 2021 21:03:50 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10189"; a="237452857" X-IronPort-AV: E=Sophos;i="5.87,290,1631602800"; d="scan'208";a="237452857" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2021 18:00:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,290,1631602800"; d="scan'208";a="514542318" Received: from allen-box.sh.intel.com ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 05 Dec 2021 18:00:15 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Joerg Roedel <joro@8bytes.org>, Alex Williamson <alex.williamson@redhat.com>, Bjorn Helgaas <bhelgaas@google.com>, Jason Gunthorpe <jgg@nvidia.com>, Christoph Hellwig <hch@infradead.org>, Kevin Tian <kevin.tian@intel.com>, Ashok Raj <ashok.raj@intel.com> Cc: Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Dan Williams <dan.j.williams@intel.com>, rafael@kernel.org, Diana Craciun <diana.craciun@oss.nxp.com>, Cornelia Huck <cohuck@redhat.com>, Eric Auger <eric.auger@redhat.com>, Liu Yi L <yi.l.liu@intel.com>, Jacob jun Pan <jacob.jun.pan@intel.com>, Chaitanya Kulkarni <kch@nvidia.com>, Stuart Yoder <stuyoder@gmail.com>, Laurentiu Tudor <laurentiu.tudor@nxp.com>, Thierry Reding <thierry.reding@gmail.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Jonathan Hunter <jonathanh@nvidia.com>, Li Yang <leoyang.li@nxp.com>, Dmitry Osipenko <digetx@gmail.com>, iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com> Subject: [PATCH v3 08/18] PCI: pci_stub: Suppress kernel DMA ownership auto-claiming Date: Mon, 6 Dec 2021 09:58:53 +0800 Message-Id: <20211206015903.88687-9-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211206015903.88687-1-baolu.lu@linux.intel.com> References: <20211206015903.88687-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org |
Series |
Fix BUG_ON in vfio_iommu_group_notifier()
|
expand
|
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c index e408099fea52..14b9b9f2ad2b 100644 --- a/drivers/pci/pci-stub.c +++ b/drivers/pci/pci-stub.c @@ -36,6 +36,7 @@ static struct pci_driver stub_driver = { .name = "pci-stub", .id_table = NULL, /* only dynamic id's */ .probe = pci_stub_probe, + .suppress_auto_claim_dma_owner = true, }; static int __init pci_stub_init(void)
The pci_dma_configure() marks the iommu_group as containing only devices with kernel drivers that manage DMA. Avoid this default behavior for the pci_stub because it does not program any DMA itself. This allows the pci_stub still able to be used by the admin to block driver binding after applying the DMA ownership to vfio. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> --- drivers/pci/pci-stub.c | 1 + 1 file changed, 1 insertion(+)