diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-01 15:08:32 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2025-07-01 15:08:32 +0100 |
commit | 4dcba9072be2c1e32f3fb676e97b098d5a9b66ad (patch) | |
tree | 1eae275dcb8280aeb6300d27776d405365d1e7ee | |
parent | 30484a6635161e8bd62014542c5fd15bbf14834f (diff) | |
download | qemu-4dcba9072be2c1e32f3fb676e97b098d5a9b66ad.zip qemu-4dcba9072be2c1e32f3fb676e97b098d5a9b66ad.tar.gz qemu-4dcba9072be2c1e32f3fb676e97b098d5a9b66ad.tar.bz2 |
target/arm/hvf: Trace hv_vcpu_run() failures
Allow distinguishing HV_ILLEGAL_GUEST_STATE in trace events.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250623121845.7214-7-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target/arm/hvf/hvf.c | 10 | ||||
-rw-r--r-- | target/arm/hvf/trace-events | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 3c234f7..0943365 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1917,7 +1917,15 @@ int hvf_vcpu_exec(CPUState *cpu) bql_unlock(); r = hv_vcpu_run(cpu->accel->fd); bql_lock(); - assert_hvf_ok(r); + switch (r) { + case HV_SUCCESS: + break; + case HV_ILLEGAL_GUEST_STATE: + trace_hvf_illegal_guest_state(); + /* fall through */ + default: + g_assert_not_reached(); + } /* handle VMEXIT */ uint64_t exit_reason = hvf_exit->reason; diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index 4fbbe4b..a4870e0 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -11,3 +11,4 @@ hvf_exit(uint64_t syndrome, uint32_t ec, uint64_t pc) "exit: 0x%"PRIx64" [ec=0x% hvf_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t cpuid) "PSCI Call x0=0x%016"PRIx64" x1=0x%016"PRIx64" x2=0x%016"PRIx64" x3=0x%016"PRIx64" cpu=0x%x" hvf_vgic_write(const char *name, uint64_t val) "vgic write to %s [val=0x%016"PRIx64"]" hvf_vgic_read(const char *name, uint64_t val) "vgic read from %s [val=0x%016"PRIx64"]" +hvf_illegal_guest_state(void) "HV_ILLEGAL_GUEST_STATE" |