Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp49629lqo; Wed, 15 May 2024 20:58:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeVsW21RmavnENwBY4aqrvKkRDDJdHiKZ0P6mO08KdDCMqn3eJzuc1R2mK5AZhqd5zB2gACO35Zlpbu2/kUJ8FBmQJT0Sv/2v5cA/0oA== X-Google-Smtp-Source: AGHT+IG6otFx1snGZ5E93iu4bZc+ourtu2uamlmysVHBwftJ2Xq68bi6GKNrea0UHQHwk7LA5VD/ X-Received: by 2002:a37:de10:0:b0:792:a5a7:b00 with SMTP id af79cd13be357-792c758feb7mr1764503185a.19.1715831921478; Wed, 15 May 2024 20:58:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715831921; cv=pass; d=google.com; s=arc-20160816; b=EoFshuMXpY3ql1Z1/OipQ4NhcEcwu8/5R9Y99/X5hK3vwYc3yDcUJDqnh0W39L3euj vnzpETkJ00tNqFvOLUWujtvWED3ZzspmzOIvQUrRra9DCHOOQSJwIn+v43G96/trARCs VYLZv+hd1toO1PS8OJr36A380k2+qCoAWECid7YxxoqvtcTOHMoAZ9JBPm2im+7Xvs6m 2nIbVDtUDPun7BFqDM+929/yuFsY0Ule0JSqqCjovH3elScT7mhbcb0JaWJFpnO4uoUX ckYUHNNMRlY/r3641c98nEUpoXeMSy8kYH0YagOORFKhG0qg+9JDfUFpsLSI3c5WiB2l EdNg== 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; bh=rnbxT+oXFZO2QEEwWjS0tiKth5mTSMr6LQktRVzPZUM=; fh=tsMVpixdu643EOBXI+8V8vKjJDVxm5z/c/WapOAnDvI=; b=e4y3c7Y9qRjGd3GNFEl9ZoiDPUZsBqHFm2ECtguuOnQAfH/ouRt1ahfUzc5/J0ZQuV UsvHziIHv+qQQxLDYLd1G2FVyawJm5IGyrNGJMg1aMOYrjwSc0zbWpDgs5FhEOdNocaQ +uY09wosp3MFobrPtn3uh5wgxVFna47eCmtK6btTHjxzAY+OOefNHFRLclZNWBHgXQWy bj03AHwW4OGnhySGcesZpBHksmaNbw6x5GZZ3Pq0QqwuDmEfyamuAs0rSiYFpgEYgv54 lb6YSWLm+JPHACGYmRAOWYGwvL3FudV67d039uY08szgsS+ckOLHFAakuz/6KnV9juy+ EdYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-180608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf38dcb5si1489581985a.754.2024.05.15.20.58.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 20:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-180608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 375CE1C22619 for ; Thu, 16 May 2024 03:58:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F1444A11; Thu, 16 May 2024 03:58:35 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C1AFB642; Thu, 16 May 2024 03:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715831914; cv=none; b=HIZb00DNGMLCtTOPTKzTXbd71hwcrWYhtRVUUaPu/dwoKWVCGGPk7AlC9r3lyscMrrhM1JPdgejX0Ijmi2dhjR4W3tVF3rsU8LEAkRfJqbg0f9JHT14Z3UjcuLIzqGajoRtYYShELiAZssaMwmLCmvwQFIFgSRWUBmi6pL7yKdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715831914; c=relaxed/simple; bh=Zhefvo70pHJbj6XKrgOY//OVMBUuvPbNTjnSlKyaCYI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=jMkQe85vOLilJXLrSW6QAX2VtlAXYdbSTn/oAzpmG7vCU059hor77Cu1SKsJ21Ucbj0hZJubAw4/VkDVzDjG6FuF0kiikDDgjSLWUI5eJQpwiDXOR6kFSzD+wMICn0u5AbHD0ZlCt+GULKkf71sInZKV/5i1jik2shfyFv2HHdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 96F8BDA7; Wed, 15 May 2024 20:58:55 -0700 (PDT) Received: from e116581.blr.arm.com (e116581.arm.com [10.162.42.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CBDA33F762; Wed, 15 May 2024 20:58:27 -0700 (PDT) From: Dev Jain To: akpm@linux-foundation.org, shuah@kernel.org Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com, kirill.shutemov@linux.intel.com, AneeshKumar.KizhakeVeetil@arm.com, Dev Jain Subject: [PATCH] selftests/mm: va_high_addr_switch: Do not skip test and give warning message post FEAT_LPA2 Date: Thu, 16 May 2024 09:26:33 +0530 Message-Id: <20240516035633.143793-1-dev.jain@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Post FEAT_LPA2, Aarch64 extends the 4KB and 16KB translation granule to large virtual addresses. Currently, the test is being skipped for said granule sizes, because the page sizes have been statically defined; to work around that would mean breaking the nice array of structs used for adding testcases. Instead, don't skip the test, and encourage the user to manually change the macros. Signed-off-by: Dev Jain --- .../testing/selftests/mm/va_high_addr_switch.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/va_high_addr_switch.c b/tools/testing/selftests/mm/va_high_addr_switch.c index cfbc501290d3..ba862f51d395 100644 --- a/tools/testing/selftests/mm/va_high_addr_switch.c +++ b/tools/testing/selftests/mm/va_high_addr_switch.c @@ -292,12 +292,24 @@ static int supported_arch(void) #elif defined(__x86_64__) return 1; #elif defined(__aarch64__) - return getpagesize() == PAGE_SIZE; + return 1; #else return 0; #endif } +#if defined(__aarch64__) +void failure_message(void) +{ + printf("TEST MAY FAIL: Are you running on a pagesize other than 64K?\n"); + printf("If yes, please change macros manually. Ensure to change the\n"); + printf("address macros too if running defconfig on 16K pagesize,\n"); + printf("since userspace VA = 47 bits post FEAT_LPA2.\n"); +} +#else +void failure_message(void) {} +#endif + int main(int argc, char **argv) { int ret; @@ -308,5 +320,8 @@ int main(int argc, char **argv) ret = run_test(testcases, ARRAY_SIZE(testcases)); if (argc == 2 && !strcmp(argv[1], "--run-hugetlb")) ret = run_test(hugetlb_testcases, ARRAY_SIZE(hugetlb_testcases)); + + if (ret) + failure_message(); return ret; } -- 2.39.2