kvm tools: Fix powerpc build after kvm__dump_mem() change
PATCH 1/1 kvm tools: Fix powerpc build after kvm__dump_mem() change
Commit 21692d1 (Beautify debug output) broke the powerpc build because it changed the signature for kvm__dump_mem() but didn't update all callers.
--- tools/kvm/powerpc/kvm-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/kvm/powerpc/kvm-cpu.c +1 -1
@@ -281,7 +281,7 @@ void kvm_cpu__show_code(struct kvm_cpu *vcpu)dprintf (debug_fd,"\n Stack:\n" );dprintf (debug_fd," ------\n" );/* Only works in real mode: */ -kvm__dump_mem (vcpu->kvm, vcpu->regs.gpr[1 ],32 ); +kvm__dump_mem (vcpu->kvm, vcpu->regs.gpr[1 ],32 , debug_fd); }void kvm_cpu__show_page_tables (struct kvm_cpu *vcpu)
Signature · 1 line
1.7.10.4
Pekka Enberg
AppliedQuoted 4 lines · Michael Ellerman
Commit 21692d1 (Beautify debug output) broke the powerpc build because it changed the signature for
kvm__dump_mem()but didn't update all callers.Signed-off-by Michael Ellerman <[email protected]>
Applied, thanks Michael!
Quoted 7 lines · Pekka Enberg
Quoted 4 lines · Michael Ellerman
Commit 21692d1 (Beautify debug output) broke the powerpc build because it changed the signature for
kvm__dump_mem()but didn't update all callers.Signed-off-by Michael Ellerman <[email protected]>Applied, thanks Michael!
D'oh! I was about to post a patch to fix this (arm is also broken)... I've dropped the powerpc hunk from my patch (see below).
Cheers,
Will
--->8
Quoted 1 line
From
9cdc8ecfdd2a1ec3075c0a129e934433f94c29dcMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Sun, 3 Feb 2013 15:37:48 +0000
Subject: [PATCH] kvm tools: arm: fix fallout from debug_fd refactoring
Commit 21692d19f744 ("kvm tools: Beautify debug output") changed the kvm__dump_mem prototype but only fixed up calls from x86.
This patch fixes arm to pass the debug_fd as required.
--- tools/kvm/arm/aarch32/kvm-cpu.c | 11 +++++------ tools/kvm/arm/aarch64/kvm-cpu.c | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-)
tools/kvm/arm/aarch32/kvm-cpu.c +5 -6
@@ -54,25 +54,24 @@ void kvm_cpu__show_code(struct kvm_cpu *vcpu) {struct kvm_one_reg reg;u32 data; +int debug_fd =kvm_cpu__get_debug_fd (); reg.addr = (u64 )(unsigned long )&data; -printf ("*pc:\n" ); +dprintf (debug_fd,"\n*pc:\n" ); reg.id =ARM_CORE_REG (usr_regs.ARM_pc);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ PC)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); -printf ("*lr (svc):\n" ); +dprintf (debug_fd,"\n*lr (svc):\n" ); reg.id =ARM_CORE_REG (svc_regs[1 ]);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ LR_svc)" ); data &= ~0x1 ; -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); }void kvm_cpu__show_registers (struct kvm_cpu *vcpu)
tools/kvm/arm/aarch64/kvm-cpu.c +5 -6
@@ -109,24 +109,23 @@ void kvm_cpu__show_code(struct kvm_cpu *vcpu) {struct kvm_one_reg reg;unsigned long data; +int debug_fd =kvm_cpu__get_debug_fd (); reg.addr = (u64)&data; -printf ("*pc:\n" ); +dprintf (debug_fd,"\n*pc:\n" ); reg.id =ARM64_CORE_REG (regs.pc);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ PC)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); -printf ("*lr:\n" ); +dprintf (debug_fd,"\n*lr:\n" ); reg.id =ARM64_CORE_REG (regs.regs[30 ]);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ LR)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); }void kvm_cpu__show_registers (struct kvm_cpu *vcpu)
Signature · 1 line
1.8.0
Pekka Enberg
AppliedQuoted 2 lines · Will Deacon
D'oh! I was about to post a patch to fix this (arm is also broken)... I've dropped the powerpc hunk from my patch (see below).
Applied, thanks Will!
Quoted 11 lines · Will Deacon
Quoted 7 lines · Pekka Enberg
Quoted 4 lines · Michael Ellerman
Commit 21692d1 (Beautify debug output) broke the powerpc build because it changed the signature for
kvm__dump_mem()but didn't update all callers.Signed-off-by Michael Ellerman <[email protected]>Applied, thanks Michael!
D'oh! I was about to post a patch to fix this (arm is also broken)... I've dropped the powerpc hunk from my patch (see below).
Thanks, Michael and Will!
Quoted 94 lines
Cheers,
Will
--->8
From
9cdc8ecfdd2a1ec3075c0a129e934433f94c29dcMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Sun, 3 Feb 2013 15:37:48 +0000
Subject: [PATCH] kvm tools: arm: fix fallout fromdebug_fdrefactoringCommit
21692d19f744("kvm tools: Beautify debug output") changed thekvm__dump_memprototype but only fixed up calls from x86.This patch fixes arm to pass the
debug_fdas required.Signed-off-by Will Deacon <[email protected]>--- tools/kvm/arm/aarch32/kvm-cpu.c | 11 +++++------ tools/kvm/arm/aarch64/kvm-cpu.c | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-)tools/kvm/arm/aarch32/kvm-cpu.c +5
-6@@ -54,25 +54,24 @@ void kvm_cpu__show_code(struct kvm_cpu *vcpu) {struct kvm_one_reg reg;u32 data; +int debug_fd =kvm_cpu__get_debug_fd (); reg.addr = (u64 )(unsigned long )&data; -printf ("*pc:\n" ); +dprintf (debug_fd,"\n*pc:\n" ); reg.id =ARM_CORE_REG (usr_regs.ARM_pc);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ PC)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); -printf ("*lr (svc):\n" ); +dprintf (debug_fd,"\n*lr (svc):\n" ); reg.id =ARM_CORE_REG (svc_regs[1 ]);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ LR_svc)" ); data &= ~0x1 ; -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); }void kvm_cpu__show_registers (struct kvm_cpu *vcpu)tools/kvm/arm/aarch64/kvm-cpu.c +5
-7@@ -109,24 +109,23 @@ void kvm_cpu__show_code(struct kvm_cpu *vcpu) {struct kvm_one_reg reg;unsigned long data; +int debug_fd =kvm_cpu__get_debug_fd (); reg.addr = (u64)&data; -printf ("*pc:\n" ); +dprintf (debug_fd,"\n*pc:\n" ); reg.id =ARM64_CORE_REG (regs.pc);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ PC)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); -printf ("*lr:\n" ); +dprintf (debug_fd,"\n*lr:\n" ); reg.id =ARM64_CORE_REG (regs.regs[30 ]);if (ioctl (vcpu->vcpu_fd,KVM_GET_ONE_REG , ®) <0 )die ("KVM_GET_ONE_REG failed (show_code @ LR)" ); -kvm__dump_mem (vcpu->kvm, data,32 ); -printf ("\n" ); +kvm__dump_mem (vcpu->kvm, data,32 , debug_fd); }void kvm_cpu__show_registers (struct kvm_cpu *vcpu) --1.8.0
Signature · 1 line
Asias He