Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2155704lqo; Sun, 19 May 2024 16:48:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7/EKfK6YgHNJkTAkn2tXQuRS23UYUPB+4o5a80mjq7J2RD7OknUvJwtG38ZX3/6usI1tN4ZGkoFy4pPRe815nP2zwAePTVRgDGqhkWw== X-Google-Smtp-Source: AGHT+IFsr+UU9ys4ABKWkUD+54FJRJkycbp5CQrqWYJYzp2rzciOrtbneOVlO6vsZkn9yJhdUk3S X-Received: by 2002:a05:6358:70c5:b0:192:b048:2940 with SMTP id e5c5f4694b2df-193bb519a77mr3778958655d.11.1716162513267; Sun, 19 May 2024 16:48:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716162513; cv=pass; d=google.com; s=arc-20160816; b=IeMCrcUwqcrQ/k4mKOO7iWFpn4owhtDxeOsQza2bcA59vTtVZdM+0ryz2LYyA2iPDz jt46WXPXvrBFGbaKzmWl55kpPozdG5E1Amg6RW67iOkE/DcIQue2A4BE4huL1Fh/claS 0ZGNz/yUB3DHRkDWS1bPC1eW6lQ0MvEP2L5NOHPAgyk79AcWedyc8KsN/x5WbUeJdJhn xNsci6SN3FXJzDwYuA/QJjKBsqh0kh2umohhS3xxyukH1+kxysJ+LEUhzScqwhw21k7a VvPSX5TmqU7qaIQ9/fK+Kkj75juAAofT32EpHFbw38RASJn9d696nsInNMX8fy4MApb9 MxVA== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=cFGU5bAz0x+imcqqlUmsqaU9ounYWaoMEBofiHID3O4=; fh=f4K2gbM9cYBxSlse7q9e8bVWrDZ/AMbqkmmcv5KpRN4=; b=qOIqD6QOgglR1jiTJQZt86BHJU8KScL6qEiX3cS+3h6ybe5kt/aIbFB38xEvIYPLSq 7QKv/ZXCgJAtW6XJLy3zBDrKHxkYvXfwTwmj+hrGrJHrJ9t1nKcpWj3IXCJkJ2IUvvxa T9FOqOFD3Y+0FburEmsiY651RBmqNz9aUccHYS1aW/6guhGgBEp9I2kRsOAX/v9k7wxv 3ilUbkjdBAaFSLckDYbT9HkF62vW4bQCYuztZjV3vxHwiWzU40rZ5z0MCDyKYEUatf7c Bks5xpG4VSwcd2k+tfukStgyeFvdhBRjwcLREUYVKM9aW06vgaX8kEnqeXgFATFA3WoF qejg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=o63afiyR; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-183305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183305-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63409e8237bsi20900809a12.76.2024.05.19.16.48.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 16:48:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=o63afiyR; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-183305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183305-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DB76728114F for ; Sun, 19 May 2024 23:48:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 803886E602; Sun, 19 May 2024 23:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="o63afiyR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 94D8C8F4A; Sun, 19 May 2024 23:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716162506; cv=none; b=XmiceVk3h4jPKK9dEB2ZKur0YtLsjWafmehjy+DF90jI62PdUZsOJLkc6m8OTP4aheyRKqn/g3ddfPdm7RzrWiI1wpv1rerK5GLoIGaWKATeooFtilb+1iScE81QF2lCPXcDoj7bqymYxr2D0InLIbN+4XEgU6oILG8c3rtBLfA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716162506; c=relaxed/simple; bh=a5IqfGM8Xs0u8K/8KiCDxhps6dGg21MfbLPXNVbgILw=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=XwIsQZjI3rhqQIsGQPoxPIcuj/qTLP4nMY2NcMQngSsWeIV4YA0WRtnjFjx7NpBaKZcPHJ7yZ31rVuyg2SX0UYalIWUoSYPLzOl2F5fdKtX/1aB3tFamZlebR4EriGlBp2J7LELL715jZzes59rZG6M5YUeBg10sLVYHQXjoeLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=o63afiyR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D331C32781; Sun, 19 May 2024 23:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1716162505; bh=a5IqfGM8Xs0u8K/8KiCDxhps6dGg21MfbLPXNVbgILw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=o63afiyR83+KBRwq41skI3q3A+V1GfTG/mO0OMqwZKAYVJ/Lu1hFXMVR6BSnO364e ELVQ64z8AJ9n92mv25r+SfyfU2wVgplSoD4yjHe+6dztoXWG1nvMFQePscRHGV/3Mr ZenLf2A1bm11k7GlaTypTAjU5iikZF9IF3pJ4zsU= Date: Sun, 19 May 2024 16:48:23 -0700 From: Andrew Morton To: Dev Jain Cc: shuah@kernel.org, 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 Subject: Re: [PATCH] selftests/mm: va_high_addr_switch: Do not skip test and give warning message post FEAT_LPA2 Message-Id: <20240519164823.8e21acfd2bf9ad13f7798f1a@linux-foundation.org> In-Reply-To: <20240516035633.143793-1-dev.jain@arm.com> References: <20240516035633.143793-1-dev.jain@arm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 16 May 2024 09:26:33 +0530 Dev Jain wrote: > 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. Which array is that? testcases[]? If so, we could keep if fairly nice by doing the array population at runtime. Something like: static struct testcase *testcases; static void init_thing() { struct testcase t[] = { ... }; testcases = malloc(sizeof(t)); memcpy(testcases, t, sizeof(t)); } > > +#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; > } This seems rather lame :(. It would be nice to fix this for once and for all.