Message ID | 20210913161604.31981-13-alex.sierra@amd.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=Ij3b=OD=kvack.org=owner-linux-mm@kernel.org> 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 32557C433EF for <linux-mm@archiver.kernel.org>; Mon, 13 Sep 2021 16:16:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8D8960EE5 for <linux-mm@archiver.kernel.org>; Mon, 13 Sep 2021 16:16:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8D8960EE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D783E6B0089; Mon, 13 Sep 2021 12:16:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2600900002; Mon, 13 Sep 2021 12:16:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA00C6B008C; Mon, 13 Sep 2021 12:16:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id AB6C66B0089 for <linux-mm@kvack.org>; Mon, 13 Sep 2021 12:16:30 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6EC25180AD804 for <linux-mm@kvack.org>; Mon, 13 Sep 2021 16:16:30 +0000 (UTC) X-FDA: 78583052940.32.80D62DD Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2078.outbound.protection.outlook.com [40.107.94.78]) by imf06.hostedemail.com (Postfix) with ESMTP id DD620801A89C for <linux-mm@kvack.org>; Mon, 13 Sep 2021 16:16:29 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XcwLs3Fki5+jVWIoy2sVGc4lUbrQ13nAY1rvcSqTdz7DnLY7qdin66pRj4fZfu6CVYaP1ej6B5B/t9Kr1+omqu/o1+K4ZN7ChB/D3v2ic1txB1tvXOGBYXFK++YbGstsG4p4T4uuGszVNvSeSm+Rlo97td03kz+0x0S5JY43O14+RIyscIczuV2q4W8ZMORqkh4iqHm5lYyGkac6ulieNn0VpxflIVZVzLaeYi65kf+LvGYtgzak4TsYZlbS/YZ/IKcJJlTOftC+zNPVM4boZyu8ZpgeX/eUE6GC8edaYmRES7fy0yr1ZiA7qyXa4dg+vNof2YrbCZ0mnNviURAVQA== 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; bh=K/HtW1JAM3zl/llSyGWWwvnXjZ+I+rn1LvUfc29p62Y=; b=KTph9eul9blD/mih2D5nTJ6fAni+JhSOGeLImBXJPAh6HjnY1gxkMDKrQHKpOGU53/TXMAolbXvxoSgno5jMpUQqcO1cA7YOIwhuEPvC749oA6EWVi+GwnAe6ihWZRWjFi2gTgw7cjnVEmc/AlBJKjlfoc7+7/SEptjqKLq8Yjm8HPdY9hkokKfg+RZe16jyKJ/F+45ea8jR4pLjYBBYUfWOu7V669fJOwImooLIpWC8rmoV22fSSaSWS8meuV853qoPVjhV2vVDNRE3gGpGw7RYCFmWNxgcM77GCgPU7cYJBzAG4UMDfFMU1VOAmvZO5NhTXzI0U/6l312lbjLcdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K/HtW1JAM3zl/llSyGWWwvnXjZ+I+rn1LvUfc29p62Y=; b=RIPjnlwkg1x+qxqzfHhlVxilo7OrrH4SzR5Pcdy9Z/k/auY3AG5J8Gp/gLkIzYH5oMYEvNUcPat5PYEqYiUtWjK1dYBJ4kfWJaNm+HPJACNjY6AMPSWHicNMrOa7WnHDyILkLjPbhB9VWt7GKNFbGr99n5IFajNRYYClFIbA1k0= Received: from SA0PR12MB4430.namprd12.prod.outlook.com (2603:10b6:806:70::20) by SN6PR12MB2719.namprd12.prod.outlook.com (2603:10b6:805:6c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 16:16:27 +0000 Received: from SA0PR12MB4430.namprd12.prod.outlook.com ([fe80::f1aa:9adc:b4f:4d14]) by SA0PR12MB4430.namprd12.prod.outlook.com ([fe80::f1aa:9adc:b4f:4d14%7]) with mapi id 15.20.4500.019; Mon, 13 Sep 2021 16:16:27 +0000 From: Alex Sierra <alex.sierra@amd.com> To: akpm@linux-foundation.org, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jgg@nvidia.com, jglisse@redhat.com Subject: [PATCH v2 12/12] tools: update test_hmm script to support SP config Date: Mon, 13 Sep 2021 11:16:04 -0500 Message-Id: <20210913161604.31981-13-alex.sierra@amd.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210913161604.31981-1-alex.sierra@amd.com> References: <20210913161604.31981-1-alex.sierra@amd.com> Content-Type: text/plain X-ClientProxiedBy: SA9P223CA0015.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::20) To SA0PR12MB4430.namprd12.prod.outlook.com (2603:10b6:806:70::20) MIME-Version: 1.0 Received: from alex-MS-7B09.amd.com (165.204.78.1) by SA9P223CA0015.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 16:16:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92d6dd4d-5132-4bd8-dadb-08d976d1d6b5 X-MS-TrafficTypeDiagnostic: SN6PR12MB2719: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <SN6PR12MB271987D23BCE5CF3CAA7CA3BFDD99@SN6PR12MB2719.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qf9MfAWJW1E084ej0zHRenqDPd1/jepm8JXikpXrINYlP4Awlfid68hsf5ozxlrk+ORn+fV+AmLg0Keka/um3lJ43I90uV13IZuKCJj0w/ojc9wuEIhlRY/GnJX78w1bGSqLhu15enk/wmYhl/Sx4UX/gx/vbGNxirDSdcfO1B00lvNyUEhBrQe9+KWCx+pM68WcvXIKR1XR3fucCIVuOfIcOGmDiN1Tc6e9heXDVL3sCU0A4IpImuMvoY/dRBbS5UmfaC0liiLXanGfy72MtGDKJIJ0ar1+3A39dJBmc+B7kzZqBP6NXxV6QSkNS2T23PRqKVLwmJOT2MkmNw4vEvn9cMYdd5Ed1CPOXofdy/lLlTTOw5rHR/Nlr+Eez6aj+GVW6F954srz/tmcNlsU+KSaLHnqHwAlNzLgPsHFbZ5kyZzNDQ0eheAuGS+cO+WiYVK0viHqE9DJFai26oSf/cFvzliUzsAONqOcJx35b3lnY3/hRCnPV7hnsWIYVLg4mclYPSXyHnSS3phjFBPbd9jYcpHuzPawfxj7CVFUJCuAjYQ1Cs0SpxVFb7KR/VqH1gqGvuVMnIC1MsuRby7Ww5rOPkoFI5pF8Yg/7yhE2W7laZ8dBKteggodYctN7re7eF0LjuV+BmNimYnCMhrQajLBoWYmMlSIT9Xx+BM7TwnzEmxVp1VyUvrhPZqWJo6wOJhXyKLxjrHLL9+LsP9JRw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4430.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(6486002)(316002)(4326008)(956004)(2616005)(2906002)(66946007)(5660300002)(7416002)(1076003)(52116002)(26005)(7696005)(186003)(478600001)(38100700002)(6666004)(38350700002)(36756003)(44832011)(8936002)(66476007)(8676002)(66556008)(83380400001)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uEa4M/N8bVu5Eb9U5WEUngKpJIawEsSweW1/2QAbH8UWrGKg5B0JD2s8mQ//jRPcEt0BtJG3qglGiwUogMJ3AxkNV5CwV26iP+4cVtZ2U15FH5JYCS8NHqcT23PEOdrEkt5iOqxV4YU1hErMlRkLpRmvm3vL+C7pVKpomXYdzRK9sF/o05oLaO5lpQv7NzS50aeTVe9mPS4QEuHi+T3aSYn/ShDsJnrQ8i1Y/t4UZ4vSc23H3V3PHe7iy4+oMRWXbH+U0W3Z0t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rg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92d6dd4d-5132-4bd8-dadb-08d976d1d6b5 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4430.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 16:16:27.3623 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qp3JnAhW1IbwykQpZe7Zlqr7dHr/3WmQBd7zyokC6dRW2nFB1IcAiA9ThBsFgXXKd7DYmHsk6is9vkpOMmQEEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2719 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DD620801A89C X-Stat-Signature: f1bw4swhpa9zwq67z48jywsz33ba7hb8 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=RIPjnlwk; spf=pass (imf06.hostedemail.com: domain of Alex.Sierra@amd.com designates 40.107.94.78 as permitted sender) smtp.mailfrom=Alex.Sierra@amd.com; dmarc=pass (policy=quarantine) header.from=amd.com X-HE-Tag: 1631549789-673195 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000019, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
MEMORY_DEVICE_PUBLIC for CPU-accessible coherent device memory
|
expand
|
diff --git a/tools/testing/selftests/vm/test_hmm.sh b/tools/testing/selftests/vm/test_hmm.sh index 0647b525a625..3eeabe94399f 100755 --- a/tools/testing/selftests/vm/test_hmm.sh +++ b/tools/testing/selftests/vm/test_hmm.sh @@ -40,7 +40,18 @@ check_test_requirements() load_driver() { - modprobe $DRIVER > /dev/null 2>&1 + if [ $# -eq 0 ]; then + modprobe $DRIVER > /dev/null 2>&1 + else + if [ $# -eq 2 ]; then + modprobe $DRIVER spm_addr_dev0=$1 spm_addr_dev1=$2 + > /dev/null 2>&1 + else + echo "Missing module parameters. Make sure pass"\ + "spm_addr_dev0 and spm_addr_dev1" + usage + fi + fi if [ $? == 0 ]; then major=$(awk "\$2==\"HMM_DMIRROR\" {print \$1}" /proc/devices) mknod /dev/hmm_dmirror0 c $major 0 @@ -58,7 +69,7 @@ run_smoke() { echo "Running smoke test. Note, this test provides basic coverage." - load_driver + load_driver $1 $2 $(dirname "${BASH_SOURCE[0]}")/hmm-tests unload_driver } @@ -75,6 +86,9 @@ usage() echo "# Smoke testing" echo "./${TEST_NAME}.sh smoke" echo + echo "# Smoke testing with SPM enabled" + echo "./${TEST_NAME}.sh smoke <spm_addr_dev0> <spm_addr_dev1>" + echo exit 0 } @@ -84,7 +98,7 @@ function run_test() usage else if [ "$1" = "smoke" ]; then - run_smoke + run_smoke $2 $3 else usage fi
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as public. Signed-off-by: Alex Sierra <alex.sierra@amd.com> --- tools/testing/selftests/vm/test_hmm.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)