From: Marc Zyngier <maz@kernel.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: kvmarm@lists.linux.dev,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>,
virtualization@lists.linux.dev, Mark Brown <broonie@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Arnd Bergmann <arnd@arndb.de>,
Dan Carpenter <dan.carpenter@linaro.org>,
Anders Roxell <anders.roxell@linaro.org>,
Aishwarya TCV <Aishwarya.TCV@arm.com>
Subject: Re: kvm: nVHE hyp panic at: __kvm_nvhe_kvm_hyp_handle_sysre
Date: Tue, 11 Feb 2025 11:36:31 +0000 [thread overview]
Message-ID: <8634gku30g.wl-maz@kernel.org> (raw)
In-Reply-To: <CA+G9fYt6Cuu6=OO9w80yhJbZB77Q0qf7nzYdvjbgDbgAw6t1jw@mail.gmail.com>
On Tue, 11 Feb 2025 11:24:06 +0000,
Naresh Kamboju <naresh.kamboju@linaro.org> 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.
next prev parent reply other threads:[~2025-02-11 12:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 11:24 kvm: nVHE hyp panic at: __kvm_nvhe_kvm_hyp_handle_sysre Naresh Kamboju
2025-02-11 11:36 ` Marc Zyngier [this message]
2025-02-12 11:31 ` Dan Carpenter
2025-02-12 11:41 ` Dan Carpenter
2025-02-12 11:42 ` Naresh Kamboju
2025-02-12 14:00 ` Marc Zyngier
2025-02-13 8:52 ` Naresh Kamboju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8634gku30g.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Aishwarya.TCV@arm.com \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dan.carpenter@linaro.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).