diff options
author | Laszlo Ersek <lersek@redhat.com> | 2013-08-06 12:37:11 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-08-08 11:01:46 -0400 |
commit | 56c4bfb3f07f3107894c00281276aea4f5e8834d (patch) | |
tree | abcdfab8c89a19415971046b9449019dab6d677c /target-s390x | |
parent | c5d7f60f0614250bd925071e25220ce5958f75d0 (diff) |
dump: rebase from host-private RAMBlock offsets to guest-physical addresses
RAMBlock.offset --> GuestPhysBlock.target_start
RAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_end
RAMBlock.length --> GuestPhysBlock.target_end -
GuestPhysBlock.target_start
"GuestPhysBlock.host_addr" is only used when writing the dump contents.
This patch enables "crash" to work with the vmcore by rebasing the vmcore
from the left side of the following diagram to the right side:
host-private
offset
relative
to ram_addr RAMBlock guest-visible paddrs
0 +-------------------+.....+-------------------+ 0
| ^ | | ^ |
| 640 KB | | 640 KB |
| v | | v |
0x0000a0000 +-------------------+.....+-------------------+ 0x0000a0000
| ^ | |XXXXXXXXXXXXXXXXXXX|
| 384 KB | |XXXXXXXXXXXXXXXXXXX|
| v | |XXXXXXXXXXXXXXXXXXX|
0x000100000 +-------------------+.....+-------------------+ 0x000100000
| ^ | | ^ |
| 3583 MB | | 3583 MB |
| v | | v |
0x0e0000000 +-------------------+.....+-------------------+ 0x0e0000000
| ^ |. |XXXXXXXXXXXXXXXXXXX|
| above_4g_mem_size | . |XXXX PCI hole XXXXX|
| v | . |XXXX XXXXX|
ram_size +-------------------+ . |XXXX 512 MB XXXXX|
. .|XXXXXXXXXXXXXXXXXXX|
. +-------------------+ 0x100000000
. | ^ |
. | above_4g_mem_size |
.| v |
+-------------------+ ram_size
+ 512 MB
Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'target-s390x')
-rw-r--r-- | target-s390x/arch_dump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target-s390x/arch_dump.c b/target-s390x/arch_dump.c index f3e5144cc1..9d36116242 100644 --- a/target-s390x/arch_dump.c +++ b/target-s390x/arch_dump.c @@ -176,7 +176,8 @@ int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, return s390x_write_all_elf64_notes("CORE", f, cpu, cpuid, opaque); } -int cpu_get_dump_info(ArchDumpInfo *info) +int cpu_get_dump_info(ArchDumpInfo *info, + const struct GuestPhysBlockList *guest_phys_blocks) { info->d_machine = EM_S390; info->d_endian = ELFDATA2MSB; |