Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1464577ybe; Wed, 11 Sep 2019 15:35:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxujoIJMtcVMos2XNY+H1a3nYIIRJqekKKp8DolKMKkopgLstm3sy5kkjlvf97c7EPHLM1 X-Received: by 2002:a50:d096:: with SMTP id v22mr39279196edd.81.1568241309802; Wed, 11 Sep 2019 15:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241309; cv=none; d=google.com; s=arc-20160816; b=Re/VZGPi1t71xIe2oDLUGLzqQnL4fcgR7O1W0gAWtihdhiDQDL0Jz3DPPj/b/VM9/R BLuOCyOHajLDVtqd1I6hKaInOL/YcZ/8gLO3sAxXCf91qbJ/nPywQwSH2CFFf59Tiavm 1ZUdbPZKmLgI1w3BFOlhIQF9EstPJQRkVCbMgzCec3vsfhsXxGxsXMr0X9BG3+S/g6Ei 9JhDN4zPLzhKb2RFWUreMohvOC4WXa47ez4HS6PwEOmGBPWZFjPyZ0zFc5ILhJKsL4PD QVjHqoZP8K3k8dBlSVBYN0aLPO04KOQYQ3oKFdd5GTUE25Su36v7WiZ6ySfGiBeQUiGi YGzQ== 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=Dh8YksJO7otMqlUqvnlcy89p09JxR+sFwxCtiGvsYNU=; b=SL8ox4ay9FF3al2r5ncORd7Y6m1/rkL/BGWxtmV1ph0SpqUkPNJIV8+pJh+ekgRZf1 xsaC+syS3VMC417Cx6GlWU26OsZ2XuNbz3ie235MZC9GHKxoTu3NklT5fOKqfooyTjmT oaUOnNm1DKZGKpAgoeuo74ALk+l1rrNYfQwjC9sjvnDHX+8qup00tXK3FHNaVLaM5Xsq zQOEc6dcwZGINrtfSj1g9TrLO+O/5KtdWbTENiThxgB6TA4Pfax7dLy+VLZxknv9OVNe 9+3ugivWp9xZWoo+fRi4WDi5lHawq8VJkMFv0nl6jzsET1fEEVyYfCdQU4/vnUQ4IxEP dfhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=OTq660Rj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si11411290edp.306.2019.09.11.15.34.40; Wed, 11 Sep 2019 15:35:09 -0700 (PDT) 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=@nvidia.com header.s=n1 header.b=OTq660Rj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727601AbfIKW2r (ORCPT + 99 others); Wed, 11 Sep 2019 18:28:47 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5890 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbfIKW2r (ORCPT ); Wed, 11 Sep 2019 18:28:47 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 11 Sep 2019 15:28:51 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 11 Sep 2019 15:28:46 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 11 Sep 2019 15:28:46 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 11 Sep 2019 22:28:43 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 11 Sep 2019 22:28:43 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 11 Sep 2019 15:28:42 -0700 From: Ralph Campbell To: CC: , , , , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Andrew Morton , "Christoph Hellwig" , Ralph Campbell Subject: [PATCH 0/4] HMM tests and minor fixes Date: Wed, 11 Sep 2019 15:28:25 -0700 Message-ID: <20190911222829.28874-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public 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=1568240931; bh=Dh8YksJO7otMqlUqvnlcy89p09JxR+sFwxCtiGvsYNU=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Type: Content-Transfer-Encoding; b=OTq660RjB6dzpe60fOzoY+lzAEtGvMCTtmZoIVWmV8sMmeiCyqSIkhLfThszuvYzb Ha0CoERgf0L/6cb34YwFmnwIJZEjBTERV3ek1H/GBmMBbY4vlY71RzAZYn7aqaf2qV kPH8Wdz/cA/lZBTpiO1DK+kfQb8eq3uoVSBW2P/Q+8fNaiT6POn7oxnFh0GpJOAcR3 NvejJ2Bw/bSaL44yDphjMPYhLgDhLt7wqqxU5n+bGJ5Id7ueYMWoUKMmfyQ/mhJQDt k6+ohnisBrTSSEzHZq0olTXV+Hc1p/35HLmSUfBpwcQRpHOZQwniQdCNWncl7t+pgb cpAhUMgiRHdww== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These changes are based on Jason's latest hmm branch. Patch 1 was previously posted here [1] but was dropped from the orginal series. Hopefully, the tests will reduce concerns about edge conditions. I'm sure more tests could be usefully added but I thought this was a good starting point. [1] https://lore.kernel.org/linux-mm/20190726005650.2566-6-rcampbell@nvidia= .com/ Ralph Campbell (4): mm/hmm: make full use of walk_page_range() mm/hmm: allow snapshot of the special zero page mm/hmm: allow hmm_range_fault() of mmap(PROT_NONE) mm/hmm/test: add self tests for HMM MAINTAINERS | 3 + drivers/char/Kconfig | 11 + drivers/char/Makefile | 1 + drivers/char/hmm_dmirror.c | 1504 ++++++++++++++++++++++++ include/Kbuild | 1 + include/uapi/linux/hmm_dmirror.h | 74 ++ mm/hmm.c | 117 +- tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 3 + tools/testing/selftests/vm/config | 3 + tools/testing/selftests/vm/hmm-tests.c | 1304 ++++++++++++++++++++ tools/testing/selftests/vm/run_vmtests | 16 + tools/testing/selftests/vm/test_hmm.sh | 105 ++ 13 files changed, 3079 insertions(+), 64 deletions(-) create mode 100644 drivers/char/hmm_dmirror.c create mode 100644 include/uapi/linux/hmm_dmirror.h create mode 100644 tools/testing/selftests/vm/hmm-tests.c create mode 100755 tools/testing/selftests/vm/test_hmm.sh --=20 2.20.1