All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 06/11] dump: allow target to set the physical base
Date: Fri, 15 Jan 2016 15:24:00 +0000	[thread overview]
Message-ID: <1452871445-4221-7-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1452871445-4221-1-git-send-email-peter.maydell@linaro.org>

From: Andrew Jones <drjones@redhat.com>

crash assumes the physical base in the kdump subheader of
makedumpfile formatted dumps is correct. Zero is not correct
for all architectures, so allow it to be changed.

(No functional change.)

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1452542185-10914-5-git-send-email-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 dump.c                     | 4 ++--
 include/sysemu/dump-arch.h | 1 +
 include/sysemu/dump.h      | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dump.c b/dump.c
index e1d9bae..2d4892b 100644
--- a/dump.c
+++ b/dump.c
@@ -775,7 +775,7 @@ static void create_header32(DumpState *s, Error **errp)
 
     /* 64bit max_mapnr_64 */
     kh->max_mapnr_64 = cpu_to_dump64(s, s->max_mapnr);
-    kh->phys_base = cpu_to_dump32(s, PHYS_BASE);
+    kh->phys_base = cpu_to_dump32(s, s->dump_info.phys_base);
     kh->dump_level = cpu_to_dump32(s, DUMP_LEVEL);
 
     offset_note = DISKDUMP_HEADER_BLOCKS * block_size + size;
@@ -875,7 +875,7 @@ static void create_header64(DumpState *s, Error **errp)
 
     /* 64bit max_mapnr_64 */
     kh->max_mapnr_64 = cpu_to_dump64(s, s->max_mapnr);
-    kh->phys_base = cpu_to_dump64(s, PHYS_BASE);
+    kh->phys_base = cpu_to_dump64(s, s->dump_info.phys_base);
     kh->dump_level = cpu_to_dump32(s, DUMP_LEVEL);
 
     offset_note = DISKDUMP_HEADER_BLOCKS * block_size + size;
diff --git a/include/sysemu/dump-arch.h b/include/sysemu/dump-arch.h
index 4335839..e25b02e 100644
--- a/include/sysemu/dump-arch.h
+++ b/include/sysemu/dump-arch.h
@@ -20,6 +20,7 @@ typedef struct ArchDumpInfo {
     int d_class;             /* ELFCLASS32 or ELFCLASS64 */
     uint32_t page_size;      /* The target's page size. If it's variable and
                               * unknown, then this should be the maximum. */
+    uint64_t phys_base;      /* The target's physmem base. */
 } ArchDumpInfo;
 
 struct GuestPhysBlockList; /* memory_mapping.h */
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 16cbd8d..2f04b24 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -33,7 +33,6 @@
 
 #define KDUMP_SIGNATURE             "KDUMP   "
 #define SIG_LEN                     (sizeof(KDUMP_SIGNATURE) - 1)
-#define PHYS_BASE                   (0)
 #define DUMP_LEVEL                  (1)
 #define DISKDUMP_HEADER_BLOCKS      (1)
 
-- 
1.9.1

  parent reply	other threads:[~2016-01-15 15:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 15:23 [Qemu-devel] [PULL 00/11] target-arm queue Peter Maydell
2016-01-15 15:23 ` [Qemu-devel] [PULL 01/11] target-arm: Use the right MMU index in arm_regime_using_lpae_format Peter Maydell
2016-01-15 15:23 ` [Qemu-devel] [PULL 02/11] xlnx-zynqmp: Add support for high DDR memory regions Peter Maydell
2016-01-15 15:23 ` [Qemu-devel] [PULL 03/11] qapi-schema: dump-guest-memory: Improve text Peter Maydell
2016-01-15 15:23 ` [Qemu-devel] [PULL 04/11] dump: qemunotes aren't commonly needed Peter Maydell
2016-01-15 15:23 ` [Qemu-devel] [PULL 05/11] dump: allow target to set the page size Peter Maydell
2016-01-15 15:24 ` Peter Maydell [this message]
2016-01-15 15:24 ` [Qemu-devel] [PULL 07/11] target-arm: support QMP dump-guest-memory Peter Maydell
2016-01-15 15:24 ` [Qemu-devel] [PULL 08/11] target-arm: dump-guest-memory: add prfpreg notes for aarch64 Peter Maydell
2016-01-15 15:24 ` [Qemu-devel] [PULL 09/11] elf: add arm note types Peter Maydell
2016-01-15 15:24 ` [Qemu-devel] [PULL 10/11] target-arm: dump-guest-memory: add vfp notes for arm Peter Maydell
2016-01-15 15:24 ` [Qemu-devel] [PULL 11/11] ARM: virt: Don't generate RTC ACPI device when using UEFI Peter Maydell
2016-01-15 17:01 ` [Qemu-devel] [PULL 00/11] target-arm queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452871445-4221-7-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.