From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Leif Lindholm" <leif.lindholm@oss.qualcomm.com>,
qemu-arm@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
"Roman Bolshakov" <rbolshakov@ddn.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alexander Graf" <agraf@csgraf.de>,
"Bernhard Beschow" <shentey@gmail.com>,
"John Snow" <jsnow@redhat.com>, "Thomas Huth" <thuth@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
kvm@vger.kernel.org, "Eric Auger" <eric.auger@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Cameron Esfahani" <dirty@apple.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Radoslaw Biernacki" <rad@semihalf.com>,
"Phil Dennis-Jordan" <phil@philjordan.eu>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH v3 11/26] target/arm/hvf: Pass @target_el argument to hvf_raise_exception()
Date: Mon, 23 Jun 2025 14:18:30 +0200 [thread overview]
Message-ID: <20250623121845.7214-12-philmd@linaro.org> (raw)
In-Reply-To: <20250623121845.7214-1-philmd@linaro.org>
In preparation of raising exceptions at EL2, add the 'target_el'
argument to hvf_raise_exception().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/hvf/hvf.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 5169bf6e23c..b932134a833 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1089,13 +1089,13 @@ void hvf_kick_vcpu_thread(CPUState *cpu)
}
static void hvf_raise_exception(CPUState *cpu, uint32_t excp,
- uint32_t syndrome)
+ uint32_t syndrome, int target_el)
{
ARMCPU *arm_cpu = ARM_CPU(cpu);
CPUARMState *env = &arm_cpu->env;
cpu->exception_index = excp;
- env->exception.target_el = 1;
+ env->exception.target_el = target_el;
env->exception.syndrome = syndrome;
arm_cpu_do_interrupt(cpu);
@@ -1454,7 +1454,7 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t reg, uint64_t *val)
SYSREG_CRN(reg),
SYSREG_CRM(reg),
SYSREG_OP2(reg));
- hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized());
+ hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1);
return 1;
}
@@ -1760,7 +1760,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t reg, uint64_t val)
SYSREG_CRN(reg),
SYSREG_CRM(reg),
SYSREG_OP2(reg));
- hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized());
+ hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1);
return 1;
}
@@ -1963,7 +1963,7 @@ int hvf_vcpu_exec(CPUState *cpu)
if (!hvf_find_sw_breakpoint(cpu, env->pc)) {
/* Re-inject into the guest */
ret = 0;
- hvf_raise_exception(cpu, EXCP_BKPT, syn_aa64_bkpt(0));
+ hvf_raise_exception(cpu, EXCP_BKPT, syn_aa64_bkpt(0), 1);
}
break;
}
@@ -2074,7 +2074,7 @@ int hvf_vcpu_exec(CPUState *cpu)
}
} else {
trace_hvf_unknown_hvc(env->pc, env->xregs[0]);
- hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized());
+ hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1);
}
break;
case EC_AA64_SMC:
@@ -2089,7 +2089,7 @@ int hvf_vcpu_exec(CPUState *cpu)
}
} else {
trace_hvf_unknown_smc(env->xregs[0]);
- hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized());
+ hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1);
}
break;
default:
--
2.49.0
next prev parent reply other threads:[~2025-06-23 12:23 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 12:18 [PATCH v3 00/26] arm: Fixes and preparatory cleanups for split-accel Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 01/26] target/arm: Remove arm_handle_psci_call() stub Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 02/26] target/arm: Reduce arm_cpu_post_init() declaration scope Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 03/26] target/arm: Unify gen_exception_internal() Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 04/26] target/arm/hvf: Simplify GIC hvf_arch_init_vcpu() Philippe Mathieu-Daudé
2025-07-01 9:39 ` Peter Maydell
2025-07-01 10:12 ` Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 05/26] target/arm/hvf: Directly re-lock BQL after hv_vcpu_run() Philippe Mathieu-Daudé
2025-06-25 15:12 ` Pierrick Bouvier
2025-06-23 12:18 ` [PATCH v3 06/26] target/arm/hvf: Trace hv_vcpu_run() failures Philippe Mathieu-Daudé
2025-07-01 9:49 ` Peter Maydell
2025-07-01 10:15 ` Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 07/26] accel/hvf: Trace VM memory mapping Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 08/26] target/arm/hvf: Log $pc in hvf_unknown_hvc() trace event Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 09/26] target/arm: Correct KVM & HVF dtb_compatible value Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 10/26] accel/hvf: Model PhysTimer register Philippe Mathieu-Daudé
2025-06-30 15:31 ` Peter Maydell
2025-06-23 12:18 ` Philippe Mathieu-Daudé [this message]
2025-07-01 9:53 ` [PATCH v3 11/26] target/arm/hvf: Pass @target_el argument to hvf_raise_exception() Peter Maydell
2025-06-23 12:18 ` [PATCH v3 12/26] target/arm: Restrict system register properties to system binary Philippe Mathieu-Daudé
2025-07-01 9:55 ` Peter Maydell
2025-07-01 10:17 ` Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 13/26] target/arm: Create GTimers *after* features finalized / accel realized Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 14/26] accel: Keep reference to AccelOpsClass in AccelClass Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 15/26] accel: Introduce AccelOpsClass::cpu_target_realize() hook Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 16/26] accel/hvf: Add hvf_arch_cpu_realize() stubs Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 17/26] target/arm/hvf: Really set Generic Timer counter frequency Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 18/26] hw/arm/virt: Only require TCG || QTest to use TrustZone Philippe Mathieu-Daudé
2025-07-01 10:05 ` Peter Maydell
2025-07-01 10:11 ` Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 19/26] hw/arm/virt: Only require TCG || QTest to use virtualization extension Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 20/26] hw/arm/virt: Rename cpu_post_init() -> post_cpus_gic_realized() Philippe Mathieu-Daudé
2025-06-30 15:34 ` Peter Maydell
2025-06-23 12:18 ` [PATCH v3 21/26] hw/arm/sbsa-ref: Tidy up use of RAMLIMIT_GB definition Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 22/26] tests/functional: Set sbsa-ref machine type in each test function Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 23/26] tests/functional: Restrict nested Aarch64 Xen test to TCG Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 24/26] tests/functional: Require TCG to run Aarch64 imx8mp-evk test Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 25/26] tests/functional: Add hvf_available() helper Philippe Mathieu-Daudé
2025-07-01 15:50 ` Peter Maydell
2025-07-01 16:21 ` Peter Maydell
2025-07-01 16:34 ` Philippe Mathieu-Daudé
2025-06-23 12:18 ` [PATCH v3 26/26] tests/functional: Expand Aarch64 SMMU tests to run on HVF accelerator Philippe Mathieu-Daudé
2025-06-23 13:01 ` Thomas Huth
2025-06-23 15:04 ` Alex Bennée
2025-06-23 15:18 ` Philippe Mathieu-Daudé
2025-06-23 16:01 ` Alex Bennée
2025-06-30 10:39 ` [PATCH v3 00/26] arm: Fixes and preparatory cleanups for split-accel Philippe Mathieu-Daudé
2025-07-01 10:16 ` Peter Maydell
2025-07-01 10:18 ` Philippe Mathieu-Daudé
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=20250623121845.7214-12-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=agraf@csgraf.de \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=dirty@apple.com \
--cc=eric.auger@redhat.com \
--cc=jsnow@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=leif.lindholm@oss.qualcomm.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=phil@philjordan.eu \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rad@semihalf.com \
--cc=rbolshakov@ddn.com \
--cc=richard.henderson@linaro.org \
--cc=shentey@gmail.com \
--cc=thuth@redhat.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 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).