Skip to content

Commit

Permalink
qemu: more verbose error when ISV=0
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Feb 21, 2025
1 parent c3e08c3 commit 5833316
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions patches/qemu-9.1.2-utm.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1173,3 +1173,37 @@ index 5b1e375726..251fc58b42 100644
--
2.41.0

From 3501ee39b597e212c1030707b898f28aeba97ee5 Mon Sep 17 00:00:00 2001
From: osy <[email protected]>
Date: Mon, 17 Feb 2025 07:19:28 -0800
Subject: [PATCH] hvf: arm: more verbose error when ISV=0

---
target/arm/hvf/hvf.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index ec4821a61a..aeb013aebf 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -2062,7 +2062,16 @@ int hvf_vcpu_exec(CPUState *cpu)
break;
}

- assert(isv);
+ if (!isv) {
+ uint64_t pc;
+ uint32_t insn;
+
+ hv_vcpu_get_reg(cpu->accel->fd, HV_REG_PC, &pc);
+ address_space_read(&address_space_memory, pc,
+ MEMTXATTRS_UNSPECIFIED, &insn, sizeof(insn));
+ error_report("Failed to handle EC_DATAABORT. ISV=0 with PC=0x%llx: 0x%08X. Please report this bug.", pc, insn);
+ abort();
+ }

if (iswrite) {
val = hvf_get_reg(cpu, srt);
--
2.41.0

0 comments on commit 5833316

Please sign in to comment.