qemu-e2k/target-i386
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
arch_memory_mapping.c
cc_helper_template.h
cc_helper.c target-i386/helper: remove DF macro 2013-06-15 17:50:21 +00:00
cpu-qom.h target-i386: Disable PMU CPUID leaf by default 2013-07-29 15:29:16 +02:00
cpu.c target-i386: Fix X86CPU error handling 2013-08-06 19:27:20 +02:00
cpu.h cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb() 2013-07-23 02:41:32 +02:00
excp_helper.c target-i386/helper: remove EIP macro 2013-06-15 17:50:13 +00:00
fpu_helper.c
gdbstub.c cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
helper.c exec: Change cpu_memory_rw_debug() argument to CPUState 2013-07-23 02:41:33 +02:00
helper.h
hyperv.c
hyperv.h
int_helper.c
ioport-user.c
kvm_i386.h
kvm-stub.c
kvm.c kvm: Change prototype of kvm_update_guest_debug() 2013-07-26 23:05:31 +02:00
machine.c Fix real mode guest segments dpl value in savevm 2013-07-23 14:36:10 +02:00
Makefile.objs cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
mem_helper.c
misc_helper.c cpu: Make first_cpu and next_cpu CPUState 2013-07-09 21:32:54 +02:00
ops_sse_header.h
ops_sse.h
seg_helper.c target-i386: Change LOG_PCALL_STATE() argument to CPUState 2013-07-09 21:33:04 +02:00
shift_helper_template.h
smm_helper.c log: Change log_cpu_state[_mask]() argument to CPUState 2013-07-09 21:33:04 +02:00
svm_helper.c target-i386: fix over 80 chars warnings 2013-06-15 17:50:38 +00:00
svm.h
TODO
topology.h
translate.c cpu: Move singlestep_enabled field from CPU_COMMON to CPUState 2013-07-23 02:41:32 +02:00