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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBE65E95A66 for ; Sat, 7 Oct 2023 16:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kNlKDeVD8o+DazCnda8zyjHEgRCx6HAhoB0EM03gA/I=; b=o1Qs0dnAcJuGmC ajVZYvhfCJjDl4MRv7JJjEGoFFy6KMbmKNFutToq32lEit7q1sSsyYzxiDtcOLX0f/ISBJq2ln8jH d/q4/DLA8cxwXUDCOr+VhDYkJBiLJpHPIfxmumqe1ZQTiJ1agRGVXlbDNDjgUtgm2/Dc5fjc8lvki 43olCCyvt+G2GayyrHK4wZYVPOWymGXUKuiGibDu8eNd3wJLm8zjiHp4096R6w+nVI3qW0S028lgL FbIm68niCl0L80w6K9H6VYKuApKuBYXopf8Kkea4IvjVAVMtqzBghdvY9d38hryOEqVMNsXGTK6DT 6JfYMCaxhDZckQi1XKgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qp9pK-007iRP-2M; Sat, 07 Oct 2023 16:06:50 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qp9pI-007iQd-1a for linux-arm-kernel@lists.infradead.org; Sat, 07 Oct 2023 16:06:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3FE0BCE01B7; Sat, 7 Oct 2023 16:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53385C433C8; Sat, 7 Oct 2023 16:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696694801; bh=0wtMv/vo5MiySmjAydqxAX8+IfcmvmzhN4ViYm6ohuc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h5tS+aKIieH1SH1zC3GiYY/lM2lzXidn4BJMAC/mkfGRUeMzKpkajmm9iY1c6dXnN HE2yPufjcx0yM6RsvgGeiJokRPWj8c8WlNUcDsm03f+X/Gmo/R4N7G8qcxkDSJKIR7 O6sAVnKop1YWCPUnuM8U43rw8Pfk/0hPbV4V3S2Xbo+S2OCzCLzC7p1Q/OKeHfQsAF dfft3owo0DQYLKo5XLTT7ECU/pEbq/jURKFiZF9UxTeM0IvGHweJhKW4jHvlLD0BJV gghaen7M1fx7EFwJPUPe2Y9SCDh8gsp977qASmDxsv9tqu4bSq1C3MKlhF41iP1TZ8 auurS6zSMPzOQ== 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 1qp9p9-0020ia-7o; Sat, 07 Oct 2023 17:06:39 +0100 Date: Sat, 07 Oct 2023 17:06:37 +0100 Message-ID: <875y3imn76.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Cc: , , , , , , Subject: Re: [PATCH 2/2] KVM: arm64: selftest: Perform ISB before reading PAR_EL1 In-Reply-To: <20231007124043.626-2-yuzenghui@huawei.com> References: <20231007124043.626-1-yuzenghui@huawei.com> <20231007124043.626-2-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) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231007_090648_714415_81CCB0B9 X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 07 Oct 2023 13:40:43 +0100, Zenghui Yu wrote: > > It looks like a mistake to issue ISB *after* reading PAR_EL1, we should > instead perform it between the AT instruction and the reads of PAR_EL1. > > As according to DDI0487J.a IJTYVP, > > "When an address translation instruction is executed, explicit > synchronization is required to guarantee the result is visible to > subsequent direct reads of PAR_EL1." > > Otherwise all guest_at testcases fail on my box with > > ==== Test Assertion Failure ==== > aarch64/page_fault_test.c:142: par & 1 == 0 > pid=1355864 tid=1355864 errno=4 - Interrupted system call > 1 0x0000000000402853: vcpu_run_loop at page_fault_test.c:681 > 2 0x0000000000402cdb: run_test at page_fault_test.c:730 > 3 0x0000000000403897: for_each_guest_mode at guest_modes.c:100 > 4 0x00000000004019f3: for_each_test_and_guest_mode at page_fault_test.c:1105 > 5 (inlined by) main at page_fault_test.c:1131 > 6 0x0000ffffb153c03b: ?? ??:0 > 7 0x0000ffffb153c113: ?? ??:0 > 8 0x0000000000401aaf: _start at ??:? > 0x1 != 0x0 (par & 1 != 0) > > Signed-off-by: Zenghui Yu Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel