1. 03 Sep, 2013 1 commit
  2. 08 Aug, 2013 3 commits
    • Laszlo Ersek's avatar
      dump: rebase from host-private RAMBlock offsets to guest-physical addresses · 56c4bfb3
      Laszlo Ersek authored
      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=981582Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      56c4bfb3
    • Laszlo Ersek's avatar
      dump: populate guest_phys_blocks · c5d7f60f
      Laszlo Ersek authored
      While the machine is paused, in guest_phys_blocks_append() we register a
      one-shot MemoryListener, solely for the initial collection of the valid
      guest-physical memory ranges that happens at listener registration time.
      
      For each range that is reported to guest_phys_blocks_region_add(), we
      attempt to merge the range with the preceding one.
      
      Ranges can only be joined if they are contiguous in both guest-physical
      address space, and contiguous in host virtual address space.
      
      The "maximal" ranges that remain in the end constitute the guest-physical
      memory map that the dump will be based on.
      
      Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      c5d7f60f
    • Laszlo Ersek's avatar
      dump: introduce GuestPhysBlockList · 5ee163e8
      Laszlo Ersek authored
      The vmcore must use physical addresses that are visible to the guest, not
      addresses that point into linear RAMBlocks. As first step, introduce the
      list type into which we'll collect the physical mappings in effect at the
      time of the dump.
      
      Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      5ee163e8
  3. 09 Jul, 2013 1 commit
  4. 11 Jun, 2013 3 commits
  5. 20 Dec, 2012 1 commit
  6. 19 Dec, 2012 2 commits
  7. 23 Oct, 2012 1 commit
    • Avi Kivity's avatar
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity authored
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  8. 15 Jun, 2012 1 commit
  9. 11 Jun, 2012 1 commit
  10. 07 Jun, 2012 1 commit
  11. 04 Jun, 2012 4 commits
    • Wen Congyang's avatar
      introduce a new monitor command 'dump-guest-memory' to dump guest's memory · 783e9b48
      Wen Congyang authored
      The command's usage:
         dump-guest-memory [-p] protocol [begin] [length]
      The supported protocol can be file or fd:
      1. file: the protocol starts with "file:", and the following string is
         the file's path.
      2. fd: the protocol starts with "fd:", and the following string is the
         fd's name.
      
      Note:
        1. If you want to use gdb to process the core, please specify -p option.
           The reason why the -p option is not default is:
             a. guest machine in a catastrophic state can have corrupted memory,
                which we cannot trust.
             b. The guest machine can be in read-mode even if paging is enabled.
                For example: the guest machine uses ACPI to sleep, and ACPI sleep
                state goes in real-mode.
        2. If you don't want to dump all guest's memory, please specify the start
           physical address and the length.
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      783e9b48
    • Wen Congyang's avatar
      Add API to get memory mapping without do paging · 2b05ab52
      Wen Congyang authored
      crash does not need the virtual address and physical address mapping, and the
      mapping does not include the memory that is not referenced by the page table.
      crash does not use the virtual address, so we can create the mapping for all
      physical memory(virtual address is always 0). This patch provides a API to do
      this thing, and it will be used in the following patch.
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      2b05ab52
    • Wen Congyang's avatar
      Add API to get memory mapping · c517076d
      Wen Congyang authored
      Add API to get all virtual address and physical address mapping.
      If the guest doesn't use paging, the virtual address is equal to the phyical
      address. The virtual address and physical address mapping is for gdb's user, and
      it does not include the memory that is not referenced by the page table. So if
      you want to use crash to anaylze the vmcore, please do not specify -p option.
      the reason why the -p option is not default explicitly: guest machine in a
      catastrophic state can have corrupted memory, which we cannot trust.
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      c517076d
    • Wen Congyang's avatar
      Add API to create memory mapping list · 80167a8a
      Wen Congyang authored
      The memory mapping list stores virtual address and physical address mapping.
      The virtual address and physical address are contiguous in the mapping.
      The folloing patch will use this information to create PT_LOAD in the vmcore.
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      80167a8a