qemu-e2k/target-s390x
Laszlo Ersek 56c4bfb3f0 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>
2013-08-08 11:01:46 -04:00
..
arch_dump.c dump: rebase from host-private RAMBlock offsets to guest-physical addresses 2013-08-08 11:01:46 -04:00
cc_helper.c
cpu-qom.h s390: Implement dump-guest-memory support for target s390x 2013-07-30 16:12:25 +02:00
cpu.c s390: Implement dump-guest-memory support for target s390x 2013-07-30 16:12:25 +02:00
cpu.h cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb() 2013-07-23 02:41:32 +02:00
fpu_helper.c
gdbstub.c cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
helper.c cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook 2013-07-23 02:41:33 +02:00
helper.h
insn-data.def
insn-format.def
int_helper.c s390x: use CONFIG_INT128 to detect __uint128_t 2013-04-26 11:58:14 +02:00
interrupt.c
ioinst.c s390x/ioinst: Fixed priority of operand exceptions 2013-07-30 16:11:00 +02:00
ioinst.h
kvm.c s390x/kvm: Remove redundant return code 2013-07-30 16:12:25 +02:00
Makefile.objs s390: Implement dump-guest-memory support for target s390x 2013-07-30 16:12:25 +02:00
mem_helper.c Remove unnecessary break statements 2013-06-01 14:25:38 +04:00
misc_helper.c
translate.c cpu: Move singlestep_enabled field from CPU_COMMON to CPUState 2013-07-23 02:41:32 +02:00