diff mbox

arm64: kvm: avoid %p in __kvm_hyp_panic

Message ID 1447682151-5827-1-git-send-email-mark.rutland@arm.com
State Accepted
Commit 1d7a4e313abbc7200982e5a68121483a3aa32295
Headers show

Commit Message

Mark Rutland Nov. 16, 2015, 1:55 p.m. UTC
Currently __kvm_hyp_panic uses %p for values which are not pointers,
such as the ESR value. This can confusingly lead to "(null)" being
printed for the value.

Use %x instead, and only use %p for host pointers.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Cc: Christoffer Dall <christoffer.dall@linaro.org>
---
 arch/arm64/kvm/hyp.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Comments

Christoffer Dall Nov. 24, 2015, 5:18 p.m. UTC | #1
On Mon, Nov 16, 2015 at 01:55:51PM +0000, Mark Rutland wrote:
> Currently __kvm_hyp_panic uses %p for values which are not pointers,

> such as the ESR value. This can confusingly lead to "(null)" being

> printed for the value.

> 

> Use %x instead, and only use %p for host pointers.

> 

> Signed-off-by: Mark Rutland <mark.rutland@arm.com>

> Acked-by: Marc Zyngier <marc.zyngier@arm.com>

> Cc: Christoffer Dall <christoffer.dall@linaro.org>


Thanks, applied.

-Christoffer

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox

Patch

diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S
index 1599701..11183ce 100644
--- a/arch/arm64/kvm/hyp.S
+++ b/arch/arm64/kvm/hyp.S
@@ -914,7 +914,7 @@  __kvm_hyp_panic:
 ENDPROC(__kvm_hyp_panic)
 
 __hyp_panic_str:
-	.ascii	"HYP panic:\nPS:%08x PC:%p ESR:%p\nFAR:%p HPFAR:%p PAR:%p\nVCPU:%p\n\0"
+	.ascii	"HYP panic:\nPS:%08x PC:%016x ESR:%08x\nFAR:%016x HPFAR:%016x PAR:%016x\nVCPU:%p\n\0"
 
 	.align	2