From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C49EC433E7 for ; Sat, 10 Oct 2020 08:34:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C120B207C4 for ; Sat, 10 Oct 2020 08:34:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729683AbgJJIcz (ORCPT ); Sat, 10 Oct 2020 04:32:55 -0400 Received: from ZXSHCAS1.zhaoxin.com ([203.148.12.81]:20625 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730026AbgJJISi (ORCPT ); Sat, 10 Oct 2020 04:18:38 -0400 X-Greylist: delayed 911 seconds by postgrey-1.27 at vger.kernel.org; Sat, 10 Oct 2020 04:18:37 EDT Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Sat, 10 Oct 2020 16:02:55 +0800 Received: from localhost.localdomain (114.242.250.7) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Sat, 10 Oct 2020 16:02:53 +0800 From: FelixCuioc To: Joerg Roedel , , , David Woodhouse , "Lu Baolu" , Dan Carpenter , CC: , , Subject: [PATCH v3 0/2] Add support for ACPI device in RMRR Date: Sat, 10 Oct 2020 04:02:39 -0400 Message-ID: <20201010080241.14642-1-FelixCui-oc@zhaoxin.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [114.242.250.7] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BIOS allocate reserved memory ranges that may be DMA targets. BIOS may report each such reserved memory region through the RMRR structures,along with the devices that requires access to the specified reserved memory region. The purpose of this series is to achieve ACPI device in RMRR access reserved memory.Therefore,it is necessary to increase the analysis of acpi device in RMRR and establish a mapping for this device. The first patch adds interfaces for detecting ACPI device in RMRR and in order to distinguish it from pci device, some interface functions are modified. The second patch adds support for probing ACPI device in RMRR. In probe_acpi_namespace_devices(),add support for direct mapping of ACPI device and add support for physical node of acpi device to be NULL. v2->v3: - Add the blank line between functions. - Make dmar_acpi_insert_dev_scope() bool,change the 1/0 to true/false and add a comment explaining. - Delete unused initialization. - if dmar_acpi_insert_dev_scope() always returns zero,will not call dmar_rmrr_add_acpi_dev(). - Use a proper error code. - Use if(!pdev). - Use goto unlock instead of mutex_unlock(). FelixCuioc (2): iommu/vt-d:Add support for detecting ACPI device in RMRR iommu/vt-d:Add support for probing ACPI device in RMRR drivers/iommu/intel/dmar.c | 76 +++++++++++++++++++++---------------- drivers/iommu/intel/iommu.c | 52 ++++++++++++++++++++++++- drivers/iommu/iommu.c | 6 +++ include/linux/dmar.h | 12 +++++- include/linux/iommu.h | 2 + 5 files changed, 113 insertions(+), 35 deletions(-) -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C3F7C433E7 for ; Sat, 10 Oct 2020 08:18:19 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 891D0207CD for ; Sat, 10 Oct 2020 08:18:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 891D0207CD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 44556867E3; Sat, 10 Oct 2020 08:18:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YRWj39ooIonP; Sat, 10 Oct 2020 08:18:16 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 063A885CC7; Sat, 10 Oct 2020 08:18:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E921FC07FF; Sat, 10 Oct 2020 08:18:15 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 967FDC0051 for ; Sat, 10 Oct 2020 08:18:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 90BD887835 for ; Sat, 10 Oct 2020 08:18:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KDjXNzxGftmj for ; Sat, 10 Oct 2020 08:18:12 +0000 (UTC) X-Greylist: delayed 00:15:08 by SQLgrey-1.7.6 Received: from ZXSHCAS1.zhaoxin.com (ZXSHCAS1.zhaoxin.com [203.148.12.81]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1188B875BB for ; Sat, 10 Oct 2020 08:18:10 +0000 (UTC) Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Sat, 10 Oct 2020 16:02:55 +0800 Received: from localhost.localdomain (114.242.250.7) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Sat, 10 Oct 2020 16:02:53 +0800 From: FelixCuioc To: Joerg Roedel , , , David Woodhouse , "Lu Baolu" , Dan Carpenter , Subject: [PATCH v3 0/2] Add support for ACPI device in RMRR Date: Sat, 10 Oct 2020 04:02:39 -0400 Message-ID: <20201010080241.14642-1-FelixCui-oc@zhaoxin.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [114.242.250.7] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) Cc: TonyWWang-oc@zhaoxin.com, CobeChen-oc@zhaoxin.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" BIOS allocate reserved memory ranges that may be DMA targets. BIOS may report each such reserved memory region through the RMRR structures,along with the devices that requires access to the specified reserved memory region. The purpose of this series is to achieve ACPI device in RMRR access reserved memory.Therefore,it is necessary to increase the analysis of acpi device in RMRR and establish a mapping for this device. The first patch adds interfaces for detecting ACPI device in RMRR and in order to distinguish it from pci device, some interface functions are modified. The second patch adds support for probing ACPI device in RMRR. In probe_acpi_namespace_devices(),add support for direct mapping of ACPI device and add support for physical node of acpi device to be NULL. v2->v3: - Add the blank line between functions. - Make dmar_acpi_insert_dev_scope() bool,change the 1/0 to true/false and add a comment explaining. - Delete unused initialization. - if dmar_acpi_insert_dev_scope() always returns zero,will not call dmar_rmrr_add_acpi_dev(). - Use a proper error code. - Use if(!pdev). - Use goto unlock instead of mutex_unlock(). FelixCuioc (2): iommu/vt-d:Add support for detecting ACPI device in RMRR iommu/vt-d:Add support for probing ACPI device in RMRR drivers/iommu/intel/dmar.c | 76 +++++++++++++++++++++---------------- drivers/iommu/intel/iommu.c | 52 ++++++++++++++++++++++++- drivers/iommu/iommu.c | 6 +++ include/linux/dmar.h | 12 +++++- include/linux/iommu.h | 2 + 5 files changed, 113 insertions(+), 35 deletions(-) -- 2.17.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu