summaryrefslogtreecommitdiffstats
path: root/hw/ppc/spapr_hcall.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2015-09-01 11:29:02 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2015-09-23 10:51:09 +1000
commitaaf87c6616370685a7cff6a21616fc5db7495014 (patch)
tree04548b2327f3d5a0492838998b3604eb2b0a3811 /hw/ppc/spapr_hcall.c
parent627c2ef7898794a28d706ecdf094491bebbb083a (diff)
downloadhqemu-aaf87c6616370685a7cff6a21616fc5db7495014.zip
hqemu-aaf87c6616370685a7cff6a21616fc5db7495014.tar.gz
ppc/spapr: Use qemu_log_mask() for hcall_dprintf()
To see the output of the hcall_dprintf statements, you currently have to enable the DEBUG_SPAPR_HCALLS macro in include/hw/ppc/spapr.h. This is ugly because a) not every user who wants to debug guest problems can or wants to recompile QEMU to be able to see such issues, and b) since this macro is disabled by default, the code in the hcall_dprintf() brackets tends to bitrot until somebody temporarily enables that macro again. Since the hcall_dprintf statements except one indicate guest problems, let's always use qemu_log_mask(LOG_GUEST_ERROR, ...) for this macro instead. One spot indicated an unimplemented host feature, so this is changed into qemu_log_mask(LOG_UNIMP, ...) instead. Now it's possible to see all those messages by simply adding the CLI parameter "-d guest_errors,unimp", without the need to re-compile the binary. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_hcall.c')
-rw-r--r--hw/ppc/spapr_hcall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 652ddf6..71fc9f2 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -971,7 +971,8 @@ target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode,
}
}
- hcall_dprintf("Unimplemented hcall 0x" TARGET_FMT_lx "\n", opcode);
+ qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x" TARGET_FMT_lx "\n",
+ opcode);
return H_FUNCTION;
}
OpenPOWER on IntegriCloud