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 6F7A1C0219D for ; Tue, 11 Feb 2025 12:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zEewryAaXWCtRdNhah6znJk1ddvJlOK8zg9epflJSpI=; b=NF0XXIdrhE9rZJ5MglwJrnCXYD l3qaAIstHpX8JlHaSO3IBhZT3OmA3m8kwQWktprD19TT7o2d9RuAXrtn6flUSXETPKq7a+MTr/hzR EUeloTINKs47XzFMph/f4SgiiocGXfgkpw6J5UXo/UREtA7hPcTpYJUsgWLjyuIiR4Zorw+Qdq1XG pK9K48FI3ixGxRdKCRFc7614QMIvvY7w4qfOlrscS65kjGtIUbIIqgXbiXLyQipKGAhQdn7b68c1b PGUq5EfcrF5Hm0K5lo2nvoIxWdiUsAGPAf5ZmQF52szEfQXtRWYPuNAf+IEuPLxNGtijTLcWX2zOI MBkn9ArQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thpWu-00000003nxa-28HR; Tue, 11 Feb 2025 12:38:20 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thoZA-00000003ZlI-3mWJ for linux-arm-kernel@lists.infradead.org; Tue, 11 Feb 2025 11:36:38 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AAE3AA40345; Tue, 11 Feb 2025 11:34:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D10C7C4CEDD; Tue, 11 Feb 2025 11:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739273795; bh=4xoNSm4ByXoD5+xDuoZWxx31MECCpddaPp/6C8dOZ/c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nTFL3aeITjNxNrnmbueW9YyMWE0wHc1nXOowZ7B0nVPJIOTsGl+KW9UlHJfGakSd7 l8ff7xeBR7J9BmV/TEFmjXmNejO/KsV4c0IbPYo2B52mu/Wlt6Oa0i67lyOsVkNo98 S9CoYS4QYkT/rFEs8fFdhiFqDzpXTFFO/j8vt0XDkuJgynSfIIfZdggagXQSO2h9KA 53kMCUh5M5coOsCuwGkqd3z9mirSW0OzPPsq4UxqLPHuyF/cus3roXfruPJ2LfM6vy im39UemlfJ01TErfqc9sFIxNs6hK1WG2MPRqP0k9Sjo9kfsW0agdhRQ9qzyEyMlW9m v3BGL8ffSgUPg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1thoZ6-002x69-AB; Tue, 11 Feb 2025 11:36:33 +0000 Date: Tue, 11 Feb 2025 11:36:31 +0000 Message-ID: <8634gku30g.wl-maz@kernel.org> From: Marc Zyngier To: Naresh Kamboju Cc: kvmarm@lists.linux.dev, Linux ARM , open list , virtualization@lists.linux.dev, Mark Brown , Catalin Marinas , Arnd Bergmann , Dan Carpenter , Anders Roxell , Aishwarya TCV Subject: Re: kvm: nVHE hyp panic at: __kvm_nvhe_kvm_hyp_handle_sysre In-Reply-To: References: 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/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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: naresh.kamboju@linaro.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, broonie@kernel.org, catalin.marinas@arm.com, arnd@arndb.de, dan.carpenter@linaro.org, anders.roxell@linaro.org, Aishwarya.TCV@arm.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-20250211_033637_088576_61B1DE17 X-CRM114-Status: GOOD ( 15.00 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 11 Feb 2025 11:24:06 +0000, Naresh Kamboju wrote: > > Regression on rk3399-rock-pi-4b while running kvm-unit-tests with > nvhe, protected and vhe mode with virtualization enabled. I do not buy this. RK3399 only has ARMv8.0 cores, which by definition do not have VHE. > > First seen on next-20250120 > Good: next-20250117 > Bad: next-20250120 till today's next-20250210 > > This is always reproducible. What about vanilla upstream? > > Regression on these devices with kernel command line boot modes. > * rk3399-rock-pi-4b-nvhe > * rk3399-rock-pi-4b-protected > * rk3399-rock-pi-4b-vhe Please show me this device running in VHE mode. For the crash at hand, which clearly shows nVHE, can you report whether the following hack fixes it for you? M. diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h index f838a45665f26..cb57420a07de2 100644 --- a/arch/arm64/kvm/hyp/include/hyp/switch.h +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h @@ -556,7 +556,7 @@ static bool kvm_handle_cntxct(struct kvm_vcpu *vcpu) return false; } - val = compute_counter_value(ctxt); + val = compute_counter_value(kern_hyp_va(ctxt)); vcpu_set_reg(vcpu, kvm_vcpu_sys_get_rt(vcpu), val); __kvm_skip_instr(vcpu); -- Without deviation from the norm, progress is not possible.