Message ID | 20231221154002.32622-3-ankita@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24E44C35274 for <linux-arm-kernel@archiver.kernel.org>; Thu, 21 Dec 2023 15:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1E2HLULABlDM61vOww8H6yZ9XnZ+8xA7uACANpZ0kJM=; b=PKyuBq4uo3F2Tu 2z9Xbb7b/dauwWrPb9n/Es1XDK715Axri1uu+Mq2vUEepHZyjtyzcmHLeUaFMlV2wnMCtD/2s1Ieh fE/+JP1BNhuJ0RkPwqxTCGPaNktm6iUP6IIMSU0/qdwV1/JdmmQTnfxxlgF7p5MdCqYtDRCf1Y7q+ V1UpgGcxTWfAncvdXUlzlXpBk3wHn6pYdijQyORxq/ePeEiGNogowV5unSlvZ6Xbs4oxyuVW32cuq deHSap0oLLDqb+GJzai987DKdKUaN1SQbgX0y+TCKLYNi+XdW+JuqxYXiNSDTOt3lMX850qHuCH1I KMvJuC4ltM82oKtCCxpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGLAS-003Nan-2i; Thu, 21 Dec 2023 15:41:00 +0000 Received: from mail-dm6nam10on20608.outbound.protection.outlook.com ([2a01:111:f400:7e88::608] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGLAO-003NXP-2P for linux-arm-kernel@lists.infradead.org; Thu, 21 Dec 2023 15:40:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NglnIY/uhT4MgIrW/82SRHbDtvo2O6Z2Ssb1OMf3kJWTecPTBkhbyDtKbQx6tWiArkWH227f/jzg+q1zeIeWPOzB/8c7XFpCBIz0oUxbAL1jgtfexFxt4rIFnCrZs75ix/tpyC6YToYdLrzKiV4AM60mDSBVGURhEAam3mnEwaDqNj1u0vr0goxjWBaW9rbuMiig5QbAaf+WgsLlhPNyW3I97LoXuBD4sQQqrnhynC4u6kYKY+0qUFbalNvvjlO11RHZcufuGyprk4Rg6rxaSdEvIyodw1DYd4S36jznibWwc54pwyl3H+gZA3pWhteXPeV9IWunl8Fr5uNkJN9n0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=98NcKXWiESUpXBqxBe7E+UCrgHbpvfJcYL9onUUx6HE=; b=mrzAn0i64CCa4rlpxR60WL6oboGcttVnpq/Jp2HQZxaHEw3xqp5hZqrUeVZY7yRSXjzhB7DZwAj96ww02Y9NUzEyajTN9CNqdop5LnEXg/myciot+dfl1+fF70fuua0cDfgRy0V/LjcEf68jpi4nNNS+b2ibrkNXnKL16C0XqWHX3lDmn3YQrkYW+MrzhewfxBWaJG70ag1gg4O5ZyHY6ICfbWIFwKiNrwRX4nj+PZAZ98rcFx+rrFkCDvb1jfqxj7vY2tt6SKQ9XEXFApme8d4EW6Tge2wjPh6e1wCtz3pllr4nSVXKsBW/LhwfqpXdZX1oaVYx0kDY8OPdu+Kdhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98NcKXWiESUpXBqxBe7E+UCrgHbpvfJcYL9onUUx6HE=; b=t7hky1AUYxa2+XVH8qH86yEs4euYsQfbAAzVEcFnnQyOw1Hk655p86yQfkk2sG3ew4a/G0DsjPgs+Kj4NpjXbGdacGQNR62OLOXcv9sb/hWgdxu18yqwRkbnIAtIKgSxcJsosoI7sFGb0StH0/mV6wVKbfFez6fNzFNyw94yllrwocinJxQYWkLUUtxiRztLVryMbvNSvJIoSBCLS1XGTk6ktqmNB8NSJyyTleC4hv51dK6JuUsP4MFrOjFOkGkXqGy+H3Ew4tYVw0X6LeE5Mu1DLf+1VVtfvArjyAIqPdhBrDAOWJZ9WOW1a30kSvZmaJttisUoQ+Sh7/QvoUtcWg== Received: from SA9PR03CA0026.namprd03.prod.outlook.com (2603:10b6:806:20::31) by DS0PR12MB7770.namprd12.prod.outlook.com (2603:10b6:8:138::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Thu, 21 Dec 2023 15:40:47 +0000 Received: from SN1PEPF00026367.namprd02.prod.outlook.com (2603:10b6:806:20:cafe::a7) by SA9PR03CA0026.outlook.office365.com (2603:10b6:806:20::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21 via Frontend Transport; Thu, 21 Dec 2023 15:40:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SN1PEPF00026367.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.14 via Frontend Transport; Thu, 21 Dec 2023 15:40:46 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 21 Dec 2023 07:40:32 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 21 Dec 2023 07:40:31 -0800 Received: from sgarnayak-dt.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Thu, 21 Dec 2023 07:40:23 -0800 From: <ankita@nvidia.com> To: <ankita@nvidia.com>, <jgg@nvidia.com>, <maz@kernel.org>, <oliver.upton@linux.dev>, <suzuki.poulose@arm.com>, <yuzenghui@huawei.com>, <catalin.marinas@arm.com>, <will@kernel.org>, <alex.williamson@redhat.com>, <kevin.tian@intel.com>, <yi.l.liu@intel.com>, <ardb@kernel.org>, <akpm@linux-foundation.org>, <gshan@redhat.com>, <mochs@nvidia.com>, <lpieralisi@kernel.org> CC: <aniketa@nvidia.com>, <cjia@nvidia.com>, <kwankhede@nvidia.com>, <targupta@nvidia.com>, <vsethi@nvidia.com>, <acurrid@nvidia.com>, <apopple@nvidia.com>, <jhubbard@nvidia.com>, <danw@nvidia.com>, <linux-mm@kvack.org>, <kvmarm@lists.linux.dev>, <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [PATCH v5 2/4] mm: introduce new flag to indicate wc safe Date: Thu, 21 Dec 2023 21:10:00 +0530 Message-ID: <20231221154002.32622-3-ankita@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231221154002.32622-1-ankita@nvidia.com> References: <20231221154002.32622-1-ankita@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026367:EE_|DS0PR12MB7770:EE_ X-MS-Office365-Filtering-Correlation-Id: 97e4db02-b274-461b-048c-08dc023b3360 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yBXR3VJxgIwu0ZLrHcsoPmGsdTjM11BpuiekZWYzvrf4jPuIas4jgcfKO1niuz4jAXvRD+hoc+fdbp4Hb+GFp453afnIJroAzbMbCZnD/ovVxZBLY37GFxQYDr61cgRTfiB5loLizn+dZE5WWo/qgdWdtokAhAxW+sYrZMdvExc17lzD+i0oGzp/RgYrTBKztJRLWvTC27HKlEBI7om2cFlWjzw06rIw3vzhzC+PHBgQtYQURwkGATX40JbtyTha94wEFvCO7kRTtDfexsMOKN4uczGlxSedqrvZeey7rZKuXuT3faKNyLtBo/ATyC4Y8hCRJd2Rdr9WKnXfxaPC8R/cT6TM3UhHJYyf6EbXk3Ld3m6x7y1Fvzt8K/ocj51oJ2zH+84wqegF6lpLvzQ5NwbV8+ESd1igGGy98Y4qeZ4zAZ5XG4zOrzPcl5w5ZFGe3tmRH+I23JkRa285oE/pMFa4CkE6AvylYL6rJvX6+6S+maA5HSbJR893e4sQJKXjFKPTsTK/zbHkH+3NflIL3HrVpHMbqBNiKxTGSA9/v7bjpexU/xA2ylOz6IHh50zAafFXCCTOCu8RPhVat9WzIS5rrZhdvSN02bUZ/N9V2dU+t0w+RqUvJhuMcrwOSoichL1ahM/eTIi3B5K6OMdQVSP2BUJnmwtON7+427kBQ7bvoWcGKS+cB+DCmIRhsfuZ/1Yeg7WZ8YxV8YqXF5zs7QgBQ3CBD80rrnQ2kBvyTV+9gJbN1ybxwLkdSErlAM6aytIdhZ1Lp+XfYFMykF9E9NCrS43Ym1mGw/vIWvxqKFtkAj4dfQ+STvpcz0LQ3izy X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(396003)(39860400002)(376002)(346002)(136003)(230922051799003)(64100799003)(451199024)(1800799012)(82310400011)(186009)(40470700004)(46966006)(36840700001)(356005)(7636003)(82740400003)(41300700001)(86362001)(8676002)(8936002)(83380400001)(4326008)(70206006)(70586007)(54906003)(110136005)(426003)(336012)(7416002)(316002)(40480700001)(5660300002)(2876002)(2906002)(47076005)(478600001)(36756003)(6666004)(7696005)(26005)(1076003)(2616005)(921008)(40460700003)(36860700001)(2101003)(83996005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2023 15:40:46.6774 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97e4db02-b274-461b-048c-08dc023b3360 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00026367.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7770 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231221_074056_785873_53B81154 X-CRM114-Status: GOOD ( 14.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
kvm: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index 418d26608ece..49277e845b21 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -391,6 +391,20 @@ extern unsigned int kobjsize(const void *objp); # define VM_UFFD_MINOR VM_NONE #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ +/* + * This flag is used to connect VFIO to arch specific KVM code. It + * indicates that the memory under this VMA is safe for use with any + * non-cachable memory type inside KVM. Some VFIO devices, on some + * platforms, are thought to be unsafe and can cause machine crashes if + * KVM does not lock down the memory type. + */ +#ifdef CONFIG_64BIT +#define VM_VFIO_ALLOW_WC_BIT 39 +#define VM_VFIO_ALLOW_WC BIT(VM_VFIO_ALLOW_WC_BIT) +#else +#define VM_VFIO_ALLOW_WC VM_NONE +#endif + /* Bits set in the VMA until the stack is in its final location */ #define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY)