From mboxrd@z Thu Jan 1 00:00:00 1970 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 7A5222E638 for ; Sat, 7 Oct 2023 16:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dD3wfOSh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBD24C433C8; Sat, 7 Oct 2023 16:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696694709; bh=AHTvfCEWzZwSEFfhzOED113jeYXJItB22tDlhfS8dsM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dD3wfOShdBK4cnTjofam23C6WT8tZmBzzJbyOnOv+OaUQUz1Tn1HmEc/l+IkZDrvO nErDEWAmTIuJTedWF//XIqyjK92kqw68UX8ajW5DRhqmdtV0x5xHT789didEqrS2nM K2s037JhwkbjoCjjaDfz4wPIad+YgNbg0Hw5h0GaM7bgSeBlAxtlpt7g6m39oG7KSW e6xy5EhH9fw62RLHM+xHt22T+H2u/Ull2XX6WTft1YoBxRKtzGTaM238mS1gWnuRoX RX8gjfjpFdzQ0cHP+dTq2BN0cY24FbTcwZcZqKcyZw5oG6tA4cm0tDKn1oWRZu71Zh lNYKJ8ZIe5OgA== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qp9nf-0020hd-DR; Sat, 07 Oct 2023 17:05:07 +0100 Date: Sat, 07 Oct 2023 17:05:05 +0100 Message-ID: <877cnymn9q.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Cc: , , , , , , Subject: Re: [PATCH 1/2] KVM: arm64: selftest: Add the missing .guest_prepare() In-Reply-To: <20231007124043.626-1-yuzenghui@huawei.com> References: <20231007124043.626-1-yuzenghui@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, ricarkol@google.com, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sat, 07 Oct 2023 13:40:42 +0100, Zenghui Yu wrote: > > Running page_fault_test on a Cortex A72 fails with > > Test: ro_memslot_no_syndrome_guest_cas > Testing guest mode: PA-bits:40, VA-bits:48, 4K pages > Testing memory backing src type: anonymous > ==== Test Assertion Failure ==== > aarch64/page_fault_test.c:117: guest_check_lse() > pid=1944087 tid=1944087 errno=4 - Interrupted system call > 1 0x00000000004028b3: vcpu_run_loop at page_fault_test.c:682 > 2 0x0000000000402d93: run_test at page_fault_test.c:731 > 3 0x0000000000403957: for_each_guest_mode at guest_modes.c:100 > 4 0x00000000004019f3: for_each_test_and_guest_mode at page_fault_test.c:1108 > 5 (inlined by) main at page_fault_test.c:1134 > 6 0x0000ffff868e503b: ?? ??:0 > 7 0x0000ffff868e5113: ?? ??:0 > 8 0x0000000000401aaf: _start at ??:? > guest_check_lse() > > because we don't have a guest_prepare stage to check the presence of > FEAT_LSE and skip the related guest_cas testing, and we end-up failing in > GUEST_ASSERT(guest_check_lse()). > > Add the missing .guest_prepare() where it's indeed required. > > Signed-off-by: Zenghui Yu Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.