From mboxrd@z Thu Jan 1 00:00:00 1970 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 10FD4C4725D for ; Fri, 19 Jan 2024 20:58:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D9806B0071; Fri, 19 Jan 2024 15:58:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 562496B0074; Fri, 19 Jan 2024 15:58:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4030B6B0075; Fri, 19 Jan 2024 15:58:11 -0500 (EST) 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 2A0F56B0071 for ; Fri, 19 Jan 2024 15:58:11 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E6B8EC0DE1 for ; Fri, 19 Jan 2024 20:58:10 +0000 (UTC) X-FDA: 81697273140.09.BE82275 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 5C0134000F for ; Fri, 19 Jan 2024 20:58:09 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Y4ZF9ZHU; spf=pass (imf12.hostedemail.com: domain of audra@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=audra@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705697889; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=0i1x7JQBWi+X6u0NziMYKO320yAB1+oNZDpaubKiGtc=; b=RUByLS2pQu4iNuOEOkv69/qflq5TBASPPLPsjIlSQeAio/icnMLGPEf0Yxd+KdPkxbIqhJ UV9fNefuG5txy6ZQw/OR+xSvIX2G6dhefMw+kLPWoqsW6Rvm4RYr5LcW5w4PAI6F1Ys+rg kpGiiu8NyNo5SQprKiIoBDSZ32Zhb94= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Y4ZF9ZHU; spf=pass (imf12.hostedemail.com: domain of audra@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=audra@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705697889; a=rsa-sha256; cv=none; b=Ndjb42oVVeGtTzfEh5eTQedzsG9+tQPERiVXAsDFTtNfaGLz9fDNh6CQ9RJc5leX52jXLQ TgI6TLDEyXIVRlMm9Uq+Q7/C/PqCkQN0xEZInZz6DfdU5jW4EN2VHqu51WZKXpzVi0luXL EZ81KbZZkmvGWdWAileIK/5fPaq2pjw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705697888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0i1x7JQBWi+X6u0NziMYKO320yAB1+oNZDpaubKiGtc=; b=Y4ZF9ZHUiUe4VyT+5c4Zh9I4+U+ekyBm7wAKhSEk0ayt63L5xlsQUFGA3ovc4ssgZsvf+O iOtH2DhL2KXE1twZPsHar8fF4ouP+1/0zZlXH1mLuFouOLB9MTC2cuym355q7kPwWhICNE fGkfgO1CNQX21ZzhROp2ZYJ5M9q3uMg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-TSUcBbBAMPOZA-Ux8uhT3g-1; Fri, 19 Jan 2024 15:58:04 -0500 X-MC-Unique: TSUcBbBAMPOZA-Ux8uhT3g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9146A85A589; Fri, 19 Jan 2024 20:58:03 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.32.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2EF561C05E0F; Fri, 19 Jan 2024 20:58:03 +0000 (UTC) From: Audra Mitchell To: shuah@kernel.org Cc: akpm@linux-foundation.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, raquini@redhat.com Subject: [PATCH] selftests/mm: Update va_high_addr_switch.sh to check CPU for la57 flag Date: Fri, 19 Jan 2024 15:58:01 -0500 Message-ID: <20240119205801.62769-1-audra@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Rspamd-Queue-Id: 5C0134000F X-Rspam-User: X-Stat-Signature: 6119ziijhh5hur476yhs1buu5qm5kzy9 X-Rspamd-Server: rspam01 X-HE-Tag: 1705697889-624704 X-HE-Meta: U2FsdGVkX1/JUH2iNlprj78Wv5d/YS3Yb3tiLSA6wDNDHwEHg9VMfGjFThsp9MIaI0+4AxacsJlYUn2izZl8P2M3hQDugdsbJSmg+fkjaMJhrKKpbITiKrnilYIH8isQUBVtfAJgdCauk6cPAPAZNBj4aKeJRQXVdOQn6+D9LShxKxEWxZKYl8dQ4nb6MGLUrVY2+wbr1AUzY3BHBu+TjDg7J33O30coolwiOWF5Sd/l44CvmwQKgF1BNKj0/ufZcCteJN1xbzwX+MaFPHpXcyCyJ/UsQY9Rr8y5MHh1i2aJEoBM0/ACzp8VVgd76eaMYRzvsHqVwPNbBrbRbW8/+xMVMAh2wGyFOSDRp3FuTZHf6ztEeft8yjrh8LG3gcUCcKwl+0RzM0FAw7likZO6ueYUT170731jZ+NKW8obgW0t2AxW7pUB9HP0QwdUqzknFd+UD+4ea77cc7gMIOvU2apN/V3wtJoKQ4qmapwHYaVVpmLU4SIV5d3Y4h6IM45jLbll2nS+JaZNc3jLZKTGxsoCB6rM/IPd9b61cW6iOPhvWWGMgycl63uEnq9AhIRMgZlRRHb6dvwqJW60+axgtaf4jDoQB0CMGjhsVOlNUnh3kqaX2bM+S1Iy52+qZmtD6992Mk2H3T2Fn1Nz3AOhjy4zlH5bdUKXhI/uNysgCtuVTvxVim/2r5mqZnsz72WFJ7hNb9AGJzDoeYI6OY8sWfCZcfNWwkmEtyJXwHtO8yCe3pdqze6ySXvMxR+rF+81K+4EDKHyIw6IsE214ZvJGCWODMAMufB+xJ1vOozLjcb7SMfWuzdv4KjI041UwBSA07BYzcc01oT9uve1e8Jhcb/hlGt58EQEI6u6oZy3EkMtNAPxo4v5rquCJ7EsrA4aLLyP/povhO7+YNGX+SpqNsvDpkcZnfhuCpJZK8pC1vW14rTxcwDKQki3QjURtoDdA+2L39AeoZK0VU6SS3Q tMoqtIqU 1pH1Mfm9unx10Nx/FwRVM2wK+dIVYreEN4YcP8vDtoHkWeKHeGgkl/xMEnGmgA7GkJCuBI6wxduC3+ylLl78eN4OqGZbr2swyQDySqQP2NO5aH+5PhG1DoA8ywGqSGa+9LQaJQt74uvU2DGmR+IpaFDOYrk8NRliuEaVRXb4X3yrdxWJXioDhtPJDObvBSHoQhNOGzgxRKXeJcaOqtBtZx/zk0w== 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: List-Subscribe: List-Unsubscribe: In order for the page table level 5 to be in use, the CPU must have the setting enabled in addition to the CONFIG option. Check for the flag to be set to avoid false test failures on systems that do not have this cpu flag set. Signed-off-by: Audra Mitchell --- tools/testing/selftests/mm/va_high_addr_switch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/mm/va_high_addr_switch.sh b/tools/testing/selftests/mm/va_high_addr_switch.sh index 45cae7cab27e..a0a75f302904 100755 --- a/tools/testing/selftests/mm/va_high_addr_switch.sh +++ b/tools/testing/selftests/mm/va_high_addr_switch.sh @@ -29,9 +29,15 @@ check_supported_x86_64() # See man 1 gzip under '-f'. local pg_table_levels=$(gzip -dcfq "${config}" | grep PGTABLE_LEVELS | cut -d'=' -f 2) + local cpu_supports_pl5=$(awk '/^flags/ {if (/la57/) {print 0;} + else {print 1}; exit}' /proc/cpuinfo 2>/dev/null) + if [[ "${pg_table_levels}" -lt 5 ]]; then echo "$0: PGTABLE_LEVELS=${pg_table_levels}, must be >= 5 to run this test" exit $ksft_skip + elif [[ "${cpu_supports_pl5}" -ne 0 ]]; then + echo "$0: CPU does not have the necessary la57 flag to support page table level 5" + exit $ksft_skip fi } -- 2.43.0