Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1251175rdb; Fri, 19 Jan 2024 12:58:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcWAxtBHn6H3jd1JzVcS0mVQRZo66ScId8m+yRq4wXY9wJ0FgbHW4PCUqq4FyZEzxyh3l2 X-Received: by 2002:a4a:d885:0:b0:598:4255:1bde with SMTP id b5-20020a4ad885000000b0059842551bdemr292921oov.8.1705697898138; Fri, 19 Jan 2024 12:58:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705697898; cv=pass; d=google.com; s=arc-20160816; b=Q/+MTVvQffAXVb0RCJUWY+VodoU48ZTWhpwyM8arFS9NJPmb7dJFA7uprTdZY/vAkS MdoAlQ0+qVvKeQG7/XXDd0nyALIKWMWJ0sjb2ntKQOh+RUysgp7IVRD1jv963iIpWIxy 00XR7CG1iUsiNluZDxKEMDohdcLIBNddXqnUxKuUAUmPdM44tpEGjXmjFXqhF4ok2Kqy yKePTuugLTkGAb9IezhbJ6rsJ00fIHBnli61Jdu3NitkoPVJuCDKLyfYinbe1vg7jgOl Av9iJurcfCM4hpiw5zDIkn9MZb6dIEsdG1JnPiMcg90tj/E15rr2K3aHCLfwrpFzioLC BhkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=0i1x7JQBWi+X6u0NziMYKO320yAB1+oNZDpaubKiGtc=; fh=t61JyezCOgr2NSTBaEgwHKsSxyKP4QGBeiC8Olmvr8o=; b=tQXvSYsD5N8D0oX7TI+nTNtAX4oF5awucIuAZjfcRI4qnhavOFNhKaUskMQTyv78HW DUTUET37YVrfmRyMPLMpYJ4inYqhnYuYKmwGLi9185X6yfDgiB07Vqf03FKDrrloIwXx rWSDIs9FGLMqFZsu7lpOk7aP6/tUCcqjKwC+YS4Mhd4ISuk9tsWuhwFxeuXnkdKTPR1y rlvhvdyvQYn0yDWxWDS95Z4dUXhLmJ/gVrH04g1hQ6f6rqoDYlltvEMjaHaMwJ83T8Dc ZClRKkqjppcNtevSGEAve0sFc958Mv/BhXKpc/1WgLSu8vbk0nzA2oKtB+L6M8kFekUP MVhA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=apdLSeSl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z12-20020a0cf00c000000b006844b71677asi76947qvk.85.2024.01.19.12.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 12:58:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=apdLSeSl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DF0EB1C21AAB for ; Fri, 19 Jan 2024 20:58:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4CA25731B; Fri, 19 Jan 2024 20:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="apdLSeSl" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC3EC57864 for ; Fri, 19 Jan 2024 20:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705697890; cv=none; b=RBbWF6KrWLJXrk1k3uytRhg7KIiWefDFySJcixmliid7Lp18KZTN4VrMcrne3gy2bdFkC93rymtulsb2ZGhhyPHUGcdNbfcUVanjoI942ZL7M4SUPvUotHrHCQRdJJ3p3XzFEvdAqVE4BwXAndvWPoMCJQbyB0/iIRZt7YN4o1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705697890; c=relaxed/simple; bh=0Z1mM8NNpnZ3fU/VyC3BK1Nb8rohKjTqsZIj6MBAYNw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OSj2nXNv1ebN7rEmojyRAeLhyah+O+PCnb0Mn+lU5CRVCX6QH1r2CnNqZatTkgTAzVJAGMl3VWyV34hJNf3+gsJj7taaV0Mlh9eSZTSoyK3Bp1OjcCrdllM6F5KYEeRj6crQOFp6b/csBaNMZpWPt8l6Y2MmUW5nu5WyrRWwz+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=apdLSeSl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705697887; 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=apdLSeSluCjmFpKj9wEcB8K6nwTa5xWd35Sfn1wQOZfYMvIRqEtLncPqenu9iuEDd0v+Ah f1t8Wd04y1YGEot3owuDwB3F9uMbNlqvZbpPKpyrOghbXkKHXUMxktUQ9q9jfXnPCAybf2 ISQ6wdLnxr2r46NdY+rQta6YXxrGvwk= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 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