From: Mohamed Mediouni <mohamed@unpredictable.fr>
To: qemu-devel@nongnu.org
Cc: Phil Dennis-Jordan <phil@philjordan.eu>,
Roman Bolshakov <rbolshakov@ddn.com>,
qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Alexander Graf <agraf@csgraf.de>,
Mohamed Mediouni <mohamed@unpredictable.fr>
Subject: [PATCH v2 5/5] hvf: arm: ignore accesses to CNTKCTL_EL12
Date: Fri, 4 Sep 2026 06:37:42 +0200 [thread overview]
Message-ID: <20260904043742.96613-6-mohamed@unpredictable.fr> (raw)
In-Reply-To: <20260904043742.96613-1-mohamed@unpredictable.fr>
This makes KVM work, with runnable virtual machines.
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
target/arm/hvf/hvf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 47eeaa0f30..c32c705ddd 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -305,6 +305,10 @@ void hvf_arm_init_debug(void)
#define SYSREG_CNTHCTL_EL2 SYSREG(3, 4, 14, 1, 0)
#define SYSREG_MDCCINT_EL1 SYSREG(2, 0, 0, 2, 0)
+/* VHE registers */
+#define SYSREG_CNTKCTL_EL12 SYSREG(3, 5, 14, 1, 0)
+
+
#define WFX_IS_WFE (1 << 0)
#define TMR_CTL_ENABLE (1 << 0)
@@ -1857,6 +1861,9 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t reg, uint64_t *val)
assert_hvf_ok(hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTHCTL_EL2, val));
}
return 0;
+ case SYSREG_CNTKCTL_EL12:
+ /* Ignore for now */
+ return 0;
case SYSREG_MDCCINT_EL1:
assert_hvf_ok(hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_MDCCINT_EL1, val));
return 0;
@@ -2155,6 +2162,9 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t reg, uint64_t val)
assert_hvf_ok(hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTHCTL_EL2, val));
}
return 0;
+ case SYSREG_CNTKCTL_EL12:
+ /* Ignore for now */
+ return 0;
case SYSREG_MDCCINT_EL1:
assert_hvf_ok(hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_MDCCINT_EL1, val));
return 0;
--
2.54.0 (Apple Git-156)
next prev parent reply other threads:[~2026-09-04 4:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 4:37 [PATCH v2 0/5] hvf: arm: add experimental VHE (x-vhe) toggle Mohamed Mediouni
2026-09-04 4:37 ` [PATCH v2 1/5] hvf: arm: advertise ID_AA64PFR0_EL1.GIC Mohamed Mediouni
2026-09-28 15:54 ` Peter Maydell
2026-09-28 21:40 ` Mohamed Mediouni
2026-09-04 4:37 ` [PATCH v2 2/5] hvf: arm: add experimental VHE toggle Mohamed Mediouni
2026-09-04 4:37 ` [PATCH v2 3/5] hvf: arm: advertise EL3 support when VHE is on Mohamed Mediouni
2026-09-04 4:37 ` [PATCH v2 4/5] hvf: arm: expose E2H0 Mohamed Mediouni
2026-09-04 4:37 ` Mohamed Mediouni [this message]
2026-09-28 15:55 ` [PATCH v2 0/5] hvf: arm: add experimental VHE (x-vhe) toggle Peter Maydell
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=20260904043742.96613-6-mohamed@unpredictable.fr \
--to=mohamed@unpredictable.fr \
--cc=agraf@csgraf.de \
--cc=peter.maydell@linaro.org \
--cc=phil@philjordan.eu \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rbolshakov@ddn.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.