Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1137896ybz; Fri, 17 Apr 2020 16:57:23 -0700 (PDT) X-Google-Smtp-Source: APiQypJCgNBQddMacf8vCVknNFpiM2SW6VS7WqlOWK0MEQ+rBIYs5GrNNCkUzZPa4Lej1tXXD/5u X-Received: by 2002:a05:6402:30ad:: with SMTP id df13mr4942573edb.339.1587167843311; Fri, 17 Apr 2020 16:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587167843; cv=none; d=google.com; s=arc-20160816; b=hatMlhW2ismdOOHWRPmN98vZanVCMUHGaphee0CK7o1YN7aY2HEpI42MU6AHmHhEjh XwPGYbdcA1qAi70snkakZtzYTwPikfwGxbsAD71Oum7SYPsxJEvumj/clLlNga8LWJlw OyZMAiBFG/YUUMRj204muDG1n3dB9bXQr52s6gWlg2QFXSx2Y/71Kzg7OW01VuqRNpBp 7woZ5il9HmtqIQIz6ViI3+kgtqV43+MOOKHgGA28ObigxhFvfemdAx7xxF4yhJOI87bT UAmTqXhjUQrCGDaguaQ+TNCpv1jHc4ng+e7Q3Q7SpPQpLs9Q0r5ztgsnRf/IZgpThaqS 42Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=jXe1h9wiaq7PvwMYbpcxTu8towIVS5zrK8zscgA10h0=; b=M8cFIj0WXlwDIDic2ZCH+kJfna2ig4/qcv7jX9mlU1pISVSUuZboqw70mW5Sbziqmi Zm8nwQQVL+yP/0MaKzfaLqp6C2YJVixlljADnn/ZC4I22cefjGoDeeEPTYxIUX7UiRVx KhnGokxy04dquLM+ept6WUUv2l8WgVg72O8tk83cKdblCldQ4yifKNYpUOOCzLUBB1CG Vb+t+Li+KZ+hDQFXyzAXH1PhSDJVMs/w/yadsvodqmcAnH263Pt76pEdHlzvhCCD2j+2 5xF5Lp8oBwdTs99NMDucwjng8xVGUEPFm9CRN2iKsJPVHDW8bQWJYpgXsDlFU5as1cRU kAmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Cc1JzmWD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b35si13555628edf.280.2020.04.17.16.57.00; Fri, 17 Apr 2020 16:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Cc1JzmWD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbgDQXzP (ORCPT + 99 others); Fri, 17 Apr 2020 19:55:15 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:15693 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725784AbgDQXzL (ORCPT ); Fri, 17 Apr 2020 19:55:11 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 17 Apr 2020 16:54:12 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Fri, 17 Apr 2020 16:55:11 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Fri, 17 Apr 2020 16:55:11 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 17 Apr 2020 23:55:06 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 17 Apr 2020 23:55:06 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 17 Apr 2020 16:55:06 -0700 From: Ralph Campbell To: , , , CC: Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , "Andrew Morton" , Shuah Khan , "Ralph Campbell" Subject: [PATCH v9 0/3] mm/hmm/test: add self tests for HMM Date: Fri, 17 Apr 2020 16:54:55 -0700 Message-ID: <20200417235458.13462-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1587167652; bh=jXe1h9wiaq7PvwMYbpcxTu8towIVS5zrK8zscgA10h0=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding; b=Cc1JzmWDg1VMol1croxpnpCYVltbXWmaVHTaQe7iQemi04JchWJEZxKwGmPQehagY kwbJdINTtwsl79S99RKAu/LDb8frNI1B1uCIfR8DSeupYTi443T7S/FMGmm/2O//A2 PnDLj4wcUh6EJKG+eAYiEBfB6QKLh+Wj1iK4E8sbTN4cUms/KQCvA2q8m/9V4CWCKa j+lKCfEH5l4Rd3x1ZMj/ednjz5SCidswcVioKDZd/iaVbM2YvFCH1K5KyM2+WOt3aN OB0THU1FdknQmeArErLxKQRAQO6K1EX69/3tnwD8bf8R1Gwpk67LgK6aMjySZfvaTT aww+gJkFd9Viw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds basic self tests for HMM and are intended for Jason Gunthorpe's rdma tree since I believe he is planning to make some HMM related changes that this can help test. Changes v8 -> v9: Rebased to linux-5.7.0-rc1. Moved include/uapi/linux/test_hmm.h to lib/test_hmm_uapi.h Added calls to release_mem_region() to free device private addresses Applied Jason's suggested changes for v8. Added a check for no VMA read access before migrating to device private memory. Changes v7 -> v8: Rebased to Jason's rdma/hmm tree, plus Jason's 6 patch series "Small hmm_range_fault() cleanups". Applied a number of changes from Jason's comments. Changes v6 -> v7: Rebased to linux-5.6.0-rc6 Reverted back to just using mmu_interval_notifier_insert() and making this series only introduce HMM self tests. Changes v5 -> v6: Rebased to linux-5.5.0-rc6 Refactored mmu interval notifier patches Converted nouveau to use the new mmu interval notifier API Changes v4 -> v5: Added mmu interval notifier insert/remove/update callable from the invalidate() callback Updated HMM tests to use the new core interval notifier API Changes v1 -> v4: https://lore.kernel.org/linux-mm/20191104222141.5173-1-rcampbell@nvidia.com Ralph Campbell (3): mm/hmm/test: add selftest driver for HMM mm/hmm/test: add selftests for HMM MAINTAINERS: add HMM selftests MAINTAINERS | 3 + lib/Kconfig.debug | 13 + lib/Makefile | 1 + lib/test_hmm.c | 1175 ++++++++++++++++++++ lib/test_hmm_uapi.h | 59 + tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 3 + tools/testing/selftests/vm/config | 2 + tools/testing/selftests/vm/hmm-tests.c | 1359 ++++++++++++++++++++++++ tools/testing/selftests/vm/run_vmtests | 16 + tools/testing/selftests/vm/test_hmm.sh | 97 ++ 11 files changed, 2729 insertions(+) create mode 100644 lib/test_hmm.c create mode 100644 lib/test_hmm_uapi.h create mode 100644 tools/testing/selftests/vm/hmm-tests.c create mode 100755 tools/testing/selftests/vm/test_hmm.sh --=20 2.25.2