Update VM ID print format to hexadecimal
Provided VM IDs are partitioned to non-secure and secure VM IDs (bit 15
clear/set), the VM ID print format looks nicer in the debug logs by
displaying an hexadecimal value rather than a decimal integer (one can
quickly determine if the mentioned ID is a VM or SP and get the ID from
the lower part of the value). This change updates print format strings
to use hex in place of decimal for VM IDs.
Change-Id: I1b957bf79fa824e7759ce88dc15e13cb72764aca
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index c10f77e..b33298c 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -318,7 +318,7 @@
}
}
- dlog_notice("SMC %#010x attempted from VM %d, blocked=%d\n", func,
+ dlog_notice("SMC %#010x attempted from VM %#x, blocked=%u\n", func,
vm->id, block_by_default);
/* Access is still allowed in permissive mode. */
@@ -730,7 +730,7 @@
uintreg_t esr_el1_value = GET_ESR_ISS(esr_el2) | GET_ESR_IL(esr_el2) |
(EC_DATA_ABORT_SAME_EL << ESR_EC_OFFSET);
- dlog_notice("Injecting Data Abort exception into VM%d.\n",
+ dlog_notice("Injecting Data Abort exception into VM %#x.\n",
vcpu->vm->id);
inject_el1_exception(vcpu, esr_el1_value, far_el2);
@@ -752,7 +752,7 @@
GET_ESR_ISS(esr_el2) | GET_ESR_IL(esr_el2) |
(EC_INSTRUCTION_ABORT_SAME_EL << ESR_EC_OFFSET);
- dlog_notice("Injecting Instruction Abort exception into VM%d.\n",
+ dlog_notice("Injecting Instruction Abort exception into VM %#x.\n",
vcpu->vm->id);
inject_el1_exception(vcpu, esr_el1_value, far_el2);
@@ -781,7 +781,7 @@
GET_ISS_CRN(esr_el2), GET_ISS_CRM(esr_el2),
GET_ISS_OP2(esr_el2), GET_ISS_RT(esr_el2));
- dlog_notice("Injecting Unknown Reason exception into VM%d.\n",
+ dlog_notice("Injecting Unknown Reason exception into VM %#x.\n",
vcpu->vm->id);
inject_el1_exception(vcpu, esr_el1_value, far_el1_value);