Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13475834ybl; Sun, 29 Dec 2019 12:49:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxsb9+EjwI3zJX9aRPk0jPMruNh3w/1Ud4/ncz6VhacQTd/hykldSbjWBGhL3uhSDIP6tGt X-Received: by 2002:a9d:7590:: with SMTP id s16mr66145930otk.89.1577652550885; Sun, 29 Dec 2019 12:49:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652550; cv=none; d=google.com; s=arc-20160816; b=CYB5uHortUCh2KO1vISzCzksmTHfpldkEcEZ6pfEEHCUII/CnylwTBrJ68+vDpzDUH nJCteB7fT4vXe4LHX1R0UW+b1pLS1PZ83CDcPqpvVOPcB6Ht3VD59Eu/y1X5KrJpdlzN ydvUJ5QD1PtJyAJrFFsnoW1y7Ea+dEwe2gyGKLx6/BJXBXUvNiDjZgrDFBCIpe6ZhqqW 7lIsTc5VzbE+8A2qyYDteJPtMJDrT1rxb/tBFu61nUx6beM15hHDfO2dXwjV1JG1+KL9 i/5oTg8e+3EQcrAg23Y2sWVlioL3tD13BqAZHEqBh0FfJVbEJeTjti3LrMeLXE2waqE5 9bww== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O1jhVqsRHBvdgv7F8CE++Ckh4/mnvZGySF/b4U9d9UQ=; b=SopLVOQOAku2hHJHZoUx2pf14QmkYbH5hgLzUpfn3AibD+E0XQdTxCYn3R6qzcZLb3 qLFUETu7Y5zw9o1qqzKnIkgOQj3LgYTa3lJvk02i6QoaSsEoOp8+p8+Wjobl8yPVot69 IslOMhZVtmPL6PWHLzTH//4kmiDOJCf6fPlgRxhINvi324+fIKHcolQud/CcvkJuqc4I rG9qWkFbTOQDVq+w/77YTmPrwxq33MokrwsizY9cib2WpU4bV1njHr5cmTJaAsAWqBAw J92garIiib73JRMVPQUJMIQJSSQN9z63fsIgBwWTJ8pQxz7ljLR3PNrT6MfCmTn8pSJQ Ll6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bvI9kuHb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h22si18360970otk.18.2019.12.29.12.48.59; Sun, 29 Dec 2019 12:49:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bvI9kuHb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733087AbfL2R4d (ORCPT + 99 others); Sun, 29 Dec 2019 12:56:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:46062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732750AbfL2R41 (ORCPT ); Sun, 29 Dec 2019 12:56:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 822F3222D9; Sun, 29 Dec 2019 17:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642187; bh=MDlhEhj2G1pFcoetkRyZjXVVe1s/XlYTo1QrtkXMKTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bvI9kuHb5yigdwFHUAjFyJ4WILLXn6uHMdPcpseR+66VpTWnJY8c7fzFMZucq++4k KGHF1qQJc8iXvf9DcSdE0303xFoHSAvnEu9sM3KCmjJ5AN+/VgLEUQrwTNrmhaY6g6 2yicBlQHXpXFIXK2lVT0THAoZzgX98ZBbEgAYWaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joerg Roedel , Lu Baolu , iommu@lists.linux-foundation.org, Jerry Snitselaar Subject: [PATCH 5.4 371/434] iommu/vt-d: Allocate reserved region for ISA with correct permission Date: Sun, 29 Dec 2019 18:27:04 +0100 Message-Id: <20191229172726.637712160@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jerry Snitselaar commit cde9319e884eb6267a0df446f3c131fe1108defb upstream. Currently the reserved region for ISA is allocated with no permissions. If a dma domain is being used, mapping this region will fail. Set the permissions to DMA_PTE_READ|DMA_PTE_WRITE. Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Cc: stable@vger.kernel.org # v5.3+ Fixes: d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions") Signed-off-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -5697,7 +5697,7 @@ static void intel_iommu_get_resv_regions struct pci_dev *pdev = to_pci_dev(device); if ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) { - reg = iommu_alloc_resv_region(0, 1UL << 24, 0, + reg = iommu_alloc_resv_region(0, 1UL << 24, prot, IOMMU_RESV_DIRECT_RELAXABLE); if (reg) list_add_tail(®->list, head);