From patchwork Mon Jul 25 18:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 12928307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9798FC433EF for ; Mon, 25 Jul 2022 18:36:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 198088E0002; Mon, 25 Jul 2022 14:36:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 147278E0001; Mon, 25 Jul 2022 14:36:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F03758E0002; Mon, 25 Jul 2022 14:36:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DDFA28E0001 for ; Mon, 25 Jul 2022 14:36:40 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id ACCC91C6013 for ; Mon, 25 Jul 2022 18:36:40 +0000 (UTC) X-FDA: 79726478160.05.487D8C5 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) by imf08.hostedemail.com (Postfix) with ESMTP id 12F9F16002C for ; Mon, 25 Jul 2022 18:36:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l2wf7Dw71JZ6A4jnriA0bxQ2CA1bIPPHx5+VtXGWSikq02pNVVgq9UFjmSw8f7gJZQpShol/FaRJBo93pKUQp+P8ryZ7PJnwXvKsBf/3x1lwHaGZxh87b3L0LPzco3SUWIyt7AplTUJPyPd3iH2+AZLghD1U/VxNmsp9c5XZvKkEICLcQ1hIsyFnz+BxhdWsdUY9U3+SLA94dp20noqDAo/29at4t+q+G4uGVF1/DReqVC7KKTg7qlH/iAs7juYkT8faljQco/CUgtqXXh36DEeIHDcCIH0YR5nWdOoH0Bt37qDICAtNy8qhII0B1LncmO/yueIqpo9HPNr5fF0HiA== 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=LzWLpmGn8mVTdJFUrGc0B9z7yDERpekyZIl0q0hhd+Q=; b=KeLcAw+CxeQ6AGIt8jkdWL4xlwwekvhnsWRFr2t/n3TLMtoMKyLpU/3T1rcP4cB1mu3cCpu9QqbeIYH3BsoQw2y1v44isBQFAhgPWxhaljO+nS6YznlBLHalEPcgBDGJp3JeoYB3o29+e96kCKpm4jx5phILGhZ6bEvWd/FkR/ppzPwzOJXZABbzXRpPe7LhNdc6/Y91LobHjwJRQIjvsS2F95OdT6tbFvoMq1S+AVt9M7a1TLOopUeuoeBzssyg0tY72GAWdO/M3a0tuJ5hxCpExPbi9nx4CCbSbC71WcoO56YdT1N2ufITi1N5ASx+mk14V4UJUXj1vcJoZe1Wow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=amd.com 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 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=LzWLpmGn8mVTdJFUrGc0B9z7yDERpekyZIl0q0hhd+Q=; b=Rc8bjQIgu+xp4MiJR9tLO05WO3enb5findqiIZAonpIgJ/s8MeE6B3jO9F3y7G8Ru8WfiUBwRaOOxR+fkcGkzDBP42lzLO3rHZALB2gvNZrtPr2QdNWFaMdEhJnqmm1QeklrwD29JvjIjEt8xlAj0L0xXtMt4RO8K/PFCZmPMYAC6Gmii+Tjhnc6dNANFA6heM+pB6AKk3OBldByhnJAW2s8810wVE/9sLOjcdDDrD0XrNXlfACPqx299PpYYQhsW0DHYlVRNpjm2rldw7McUlLvs+OvBf+HkkGcKWsW+SXIi7mYG+66l5+LmL2PBPcnWvCiJuBZ0QTjRCA3SHatmg== Received: from MW4PR04CA0261.namprd04.prod.outlook.com (2603:10b6:303:88::26) by DM5PR1201MB0171.namprd12.prod.outlook.com (2603:10b6:4:56::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Mon, 25 Jul 2022 18:36:37 +0000 Received: from CO1NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::71) by MW4PR04CA0261.outlook.office365.com (2603:10b6:303:88::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Mon, 25 Jul 2022 18:36:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT049.mail.protection.outlook.com (10.13.175.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Mon, 25 Jul 2022 18:36:36 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 25 Jul 2022 18:36:36 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 25 Jul 2022 11:36:35 -0700 Received: from rcampbell-dev.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Mon, 25 Jul 2022 11:36:35 -0700 From: Ralph Campbell To: CC: Felix Kuehling , Philip Yang , Alistair Popple , Jason Gunthorpe , Andrew Morton , Ralph Campbell Subject: [PATCH v2 0/2] mm/hmm: fault non-owner device private entries Date: Mon, 25 Jul 2022 11:36:13 -0700 Message-ID: <20220725183615.4118795-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2546245a-114e-46c4-af7e-08da6e6c9b55 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0171:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +GzjxZ5zqh75HOIs3f2pwitpJ7U16mB7wtw+qppNyWLtI7HalPdNVMiY567+ev5DoHl1i/oLAOzSkRqmZnAUa2/2GQgdXRPVWe2wfZrKRzZFcT45qX2GltDaHyym4J7lI4yJb2fM8gxxWTtzTV2CjoATHfG9CAdyR4oLRjMjBdyvRE1aUR6jtCVa2OLktKA8mm1nKtEHUUefoDhxIxVAIHEZAlqxvMH9vSG4i0cer4Ts/2SRs8is4f39E3bL4A1DzTtG5Sosh96WislnoXVE+hH36eyvWE9cX3KUf6XELz9Je80MzfZpUXAfYvAgrbMyPTaBi6DNSELFICaFS8rYR9KHF4FATIhMk/TBlcoGqOX0pgN7Sk+ePVmBXgEdOnY/ztHDMCtmvOGYLSQOmKbbYFAttq+mIXP+ZDXGrYC+FJT4lFUB903abSWNH5imo/BnCU7R/XBzVhlnJQe6GWcMvKkoP9A8hSR9ZCmJj5vvxaIf0DsipSYZ0eYtXiwd8H7Me4fn7QgWysT7xxHtZCdAz97mUscN8DJNac1qu7h9I74AvkoeqV21eBhjPmr2/zelyPQ8K2QJXmDPFTwCpH6QtmmNmEDTcVnjZAmrkCdoxeIiDp+xXyr09eIOvc+R0rZM+28lpExypaBAQUqGZZICL8cUaSywm+Ug2VYEuhi/Xlypu7HCkMsCtTnHNLkx/i+uTupjoApR5glJNqM0le4MIWdinQmqPMK3YCsWoa0PGvVSPcVaLzoOl23PavuXE66RFrOR0mnaDPd/lqHhGYR9cTE2k/Iaid61sOASPxmOk7jApsw9b6zo12xUVyA0Sz7gFT/JCRRapkQbpYraidg+Gg== X-Forefront-Antispam-Report: CIP:12.22.5.238;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(396003)(376002)(39860400002)(346002)(136003)(36840700001)(46966006)(40470700004)(82740400003)(86362001)(356005)(36860700001)(8936002)(2906002)(70586007)(336012)(83380400001)(2616005)(1076003)(36756003)(26005)(186003)(47076005)(426003)(81166007)(107886003)(41300700001)(7696005)(54906003)(478600001)(316002)(6916009)(70206006)(4744005)(8676002)(5660300002)(4326008)(40480700001)(6666004)(40460700003)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 18:36:36.6860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2546245a-114e-46c4-af7e-08da6e6c9b55 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.238];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0171 ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=Rc8bjQIg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com; spf=none (imf08.hostedemail.com: domain of rcampbell@nvidia.com has no SPF policy when checking 40.107.244.63) smtp.mailfrom=rcampbell@nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658774200; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=LzWLpmGn8mVTdJFUrGc0B9z7yDERpekyZIl0q0hhd+Q=; b=xEvP0yR5Ay5zsORRE6NQZdZoOx5y+AB38kjrU4CYGqIbCpCs5Vp03RDqtRA3HHLjPRFfdM 9L++Or5OwFbT2/ILSOVpD5cC9q68pJaIzXeYIycNBOkdB7hloLNY2hTevqLNJeZumqX5BI Me0PfGPLITgpJ5Lcevsnraaru403CBA= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1658774200; a=rsa-sha256; cv=pass; b=PNfzgyU6J9BWyoqjbGxqxlD4OcVvJUfHLzLvugAqMOyvn+qpGKZOYpKteLZBkiPwowF3j1 PkZSByCfE+eDlk+T11bm0GY/Nz09XIjU3LeHK+gA5MMilEiLPRYgg9sVf+uZxdfJhB1l3G uuWyN4GNOFpYL6OY3/X7Popw9lTWsTQ= X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 12F9F16002C X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=Rc8bjQIg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com; spf=none (imf08.hostedemail.com: domain of rcampbell@nvidia.com has no SPF policy when checking 40.107.244.63) smtp.mailfrom=rcampbell@nvidia.com X-Stat-Signature: pkibrc46u7rnwmxm33qk8ssozdhwbfqy X-HE-Tag: 1658774198-400970 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Changes from v1 to v2: Made code style changes suggested by Alistair Popple Added a self test to hmm-tests.c (Jason Gunthorpe) Ralph Campbell (2): mm/hmm: fault non-owner device private entries mm/hmm: add a test for cross device private faults mm/hmm.c | 19 ++++++++----------- tools/testing/selftests/vm/hmm-tests.c | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 13 deletions(-)