Skip to content

target-ppc: Add support for dumping guest memory using qemu gdb server

Aneesh Kumar K.V qemu-devel 2 versions – In review

Get series with b4
b4 am 1380644373-15500-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com

Versions newest first · linked by author and title

  1. v1 Latest posting 2/26 patches 1 replyIn review
  2. v1 posting 1/24 patches 3 repliesApplied

Changes from V3 from the cover letter

* Address review feedback
* Updated "target-ppc: Fix page table lookup with kvm enabled" to not reopen the htab in loop

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target-ppc: Update slb array with correct index values.target-ppc/kvm.c+15 -20 replies
2/6target-ppc: Fix page table lookup with kvm enabledtarget-ppc/kvm.c target-ppc/kvm_ppc.h target-ppc/mmu-hash64.c+104 -240 replies
3/6target-ppc: Check for error on address translation in memsave commandcpus.c+4 -10 replies
4/6target-ppc: Use #define for max slb entriestarget-ppc/cpu.h target-ppc/kvm.c target-ppc/machine.c+5 -40 replies
5/6dump-guest-memory: Check for the correct return valuedump.c+2 -20 replies
6/6target-ppc: dump-guest-memory supportinclude/elf.h target-ppc/Makefile.objs target-ppc/arch_dump.c +2 more+265 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH -V4 RESEND 0/6] target-ppc: Add support for dumping guest memory using qemu gdb server

Hi,

This patch series implement support for dumping guest memory using qemu gdb server. The last patch also enable qemu monitor command dump-guest-memory

With this patch series we can now do

(gdb) x/4i htab_call_hpte_insert1

   0xc0000000000470d8 <.htab_call_hpte_insert1>:        bl      0xc0000000000470d8 <.htab_call_hpte_insert1>
   0xc0000000000470dc <.htab_call_hpte_insert1+4>:      cmpdi   r3,0
   0xc0000000000470e0 <.htab_call_hpte_insert1+8>:      bge     0xc000000000047190 <htab_pte_insert_ok>
   0xc0000000000470e4 <.htab_call_hpte_insert1+12>:     cmpdi   r3,-2

(gdb) target remote localhost:1234
Remote debugging using localhost:1234
.plpar_hcall_norets () at arch/powerpc/platforms/pseries/hvCall.S:119
119 HCALL_INST_POSTCALL_NORETS
(gdb) x/4i htab_call_hpte_insert1

   0xc0000000000470d8 <.htab_call_hpte_insert1>:        bl      0xc00000000005f8f0 <pSeries_lpar_hpte_insert>
   0xc0000000000470dc <.htab_call_hpte_insert1+4>:      cmpdi   r3,0
   0xc0000000000470e0 <.htab_call_hpte_insert1+8>:      bge     0xc000000000047190 <htab_pte_insert_ok>
   0xc0000000000470e4 <.htab_call_hpte_insert1+12>:     cmpdi   r3,-2

(gdb)

NOTE: We still don't support inserting breakpoints.

Before Fix:
(qemu) memsave 0xc0000000000470d8 10 memdump
Invalid parameter 'addr'
(qemu)

After fix:

(qemu) memsave 0xc0000000000470d8 10 memdump
(qemu)

Changes from V3:
* Address review feedback
* Updated "target-ppc: Fix page table lookup with kvm enabled" to not reopen the htab in loop

Changes from V2:
* Address review comments updating "target-ppc: Update slb array with correct index values"
* Add new patch "target-ppc: Use #define for max slb entries"
* Drop the patch "target-ppc: Use #define instead of opencoding SLB valid bit" because it got picked from last series.