From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Claudio Fontana" <cfontana@suse.de>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Alexander Graf" <agraf@csgraf.de>,
"Cornelia Huck" <cohuck@redhat.com>
Subject: [PATCH v6 04/29] target/arm: Move PC alignment check
Date: Fri, 17 Feb 2023 17:11:25 -0300 [thread overview]
Message-ID: <20230217201150.22032-5-farosas@suse.de> (raw)
In-Reply-To: <20230217201150.22032-1-farosas@suse.de>
Move this earlier to make the next patch diff cleaner. While here
update the comment slightly to not give the impression that the
misalignment affects only TCG.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/machine.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/target/arm/machine.c b/target/arm/machine.c
index 5f26152652..b4c3850570 100644
--- a/target/arm/machine.c
+++ b/target/arm/machine.c
@@ -839,6 +839,15 @@ static int cpu_post_load(void *opaque, int version_id)
}
}
+ /*
+ * Misaligned thumb pc is architecturally impossible. Fail the
+ * incoming migration. For TCG it would trigger the assert in
+ * thumb_tr_translate_insn().
+ */
+ if (!is_a64(env) && env->thumb && (env->regs[15] & 1)) {
+ return -1;
+ }
+
hw_breakpoint_update_all(cpu);
hw_watchpoint_update_all(cpu);
@@ -856,15 +865,6 @@ static int cpu_post_load(void *opaque, int version_id)
}
}
- /*
- * Misaligned thumb pc is architecturally impossible.
- * We have an assert in thumb_tr_translate_insn to verify this.
- * Fail an incoming migrate to avoid this assert.
- */
- if (!is_a64(env) && env->thumb && (env->regs[15] & 1)) {
- return -1;
- }
-
if (!kvm_enabled()) {
pmu_op_finish(&cpu->env);
}
--
2.35.3
next prev parent reply other threads:[~2023-02-17 20:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 20:11 [PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 01/29] target/arm: rename handle_semihosting to tcg_handle_semihosting Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 02/29] target/arm: wrap psci call with tcg_enabled Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 03/29] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled() Fabiano Rosas
2023-02-17 20:11 ` Fabiano Rosas [this message]
2023-02-17 20:11 ` [PATCH v6 05/29] target/arm: Move cpregs code out of cpu.h Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 06/29] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled Fabiano Rosas
2023-02-18 4:06 ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 07/29] target/arm: Wrap TCG-only code in debug_helper.c Fabiano Rosas
2023-02-18 4:10 ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 08/29] target/arm: move translate modules to tcg/ Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 09/29] target/arm: move helpers " Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 10/29] target/arm: Move psci.c into the tcg directory Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 11/29] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 12/29] target/arm: Move hflags code into the tcg directory Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 13/29] target/arm: Move regime_using_lpae_format into internal.h Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 14/29] target/arm: Don't access TCG code when debugging with KVM Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 15/29] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 16/29] target/arm: Move cortex sysregs into cpu64.c Fabiano Rosas
2023-02-18 4:26 ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 17/29] tests/avocado: Skip tests that require a missing accelerator Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 18/29] tests/avocado: Tag TCG tests with accel:tcg Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 19/29] target/arm: Move 64-bit TCG CPUs into tcg/ Fabiano Rosas
2023-02-21 14:16 ` Peter Maydell
2023-02-22 13:58 ` Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 20/29] target/arm: move cpu_tcg to tcg/cpu32.c Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 21/29] target/arm: Use "max" as default cpu for the virt machine with KVM Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 22/29] tests/qtest: arm-cpu-features: Match tests to required accelerators Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 23/29] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 24/29] target/avocado: Pass parameters to migration test Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 25/29] tests/avocado: add machine:none tag to version.py Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 26/29] arm/Kconfig: Always select SEMIHOSTING when TCG is present Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 27/29] arm/Kconfig: Do not build TCG-only boards on a KVM-only build Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 28/29] gitlab-ci: Check building KVM-only aarch64 target Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 29/29] tests/qtest: Fix tests when no KVM or TCG are present Fabiano Rosas
2023-02-21 14:21 ` [PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds Peter Maydell
2023-02-22 12:40 ` Fabiano Rosas
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=20230217201150.22032-5-farosas@suse.de \
--to=farosas@suse.de \
--cc=agraf@csgraf.de \
--cc=alex.bennee@linaro.org \
--cc=cfontana@suse.de \
--cc=cohuck@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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.