From: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: andrew.cooper3-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org,
kumagai-atsushi-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org,
kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org
Cc: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v2 1/7] xen: Improve calculation of beginning of virtual address space
Date: Tue, 16 Jul 2013 14:32:03 +0200 [thread overview]
Message-ID: <1373977929-4253-2-git-send-email-daniel.kiper@oracle.com> (raw)
In-Reply-To: <1373977929-4253-1-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Xen commit 4b28bf6ae90bd83fd1113d8bdc53c3266ffeb328 (x86: re-introduce
map_domain_page() et al) once again altered virtual address space.
Current algorithm calculating its start could not cope with that change.
New version establishes this value on the base of domain_list placement
and is more generic.
Similar patch was applied to crash tool.
Signed-off-by: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
arch/x86_64.c | 16 +++++++++++-----
makedumpfile.h | 2 --
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/arch/x86_64.c b/arch/x86_64.c
index 8e61b20..d864a06 100644
--- a/arch/x86_64.c
+++ b/arch/x86_64.c
@@ -372,14 +372,20 @@ int get_xen_basic_info_x86_64(void)
info->xen_phys_start = info->xen_crash_info.v2->xen_phys_start;
}
+ info->xen_virt_start = SYMBOL(domain_list);
+
+ /*
+ * Xen virtual mapping is aligned to 1 GiB boundary.
+ * domain_list lives in bss which sits no more than
+ * 1 GiB below beginning of virtual address space.
+ */
+ info->xen_virt_start &= 0xffffffffc0000000;
+
if (info->xen_crash_info.com &&
- info->xen_crash_info.com->xen_major_version >= 4) {
- info->xen_virt_start = XEN_VIRT_START_V4;
+ info->xen_crash_info.com->xen_major_version >= 4)
info->directmap_virt_end = DIRECTMAP_VIRT_END_V4;
- } else {
- info->xen_virt_start = XEN_VIRT_START_V3;
+ else
info->directmap_virt_end = DIRECTMAP_VIRT_END_V3;
- }
if (SYMBOL(pgd_l4) == NOT_FOUND_SYMBOL) {
ERRMSG("Can't get pml4.\n");
diff --git a/makedumpfile.h b/makedumpfile.h
index a5826e0..1a87500 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1473,8 +1473,6 @@ int get_xen_info_x86(void);
#define DIRECTMAP_VIRT_END_V3 (0xffff840000000000)
#define DIRECTMAP_VIRT_END_V4 (0xffff880000000000)
#define DIRECTMAP_VIRT_END (info->directmap_virt_end)
-#define XEN_VIRT_START_V3 (0xffff828c80000000)
-#define XEN_VIRT_START_V4 (0xffff82c480000000)
#define XEN_VIRT_START (info->xen_virt_start)
#define XEN_VIRT_END (XEN_VIRT_START + (1UL << 30))
#define FRAMETABLE_VIRT_START 0xffff82f600000000
--
1.7.10.4
next prev parent reply other threads:[~2013-07-16 12:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 12:32 [PATCH v2 0/7] makedumpfile: Xen fixes and minor cleanups Daniel Kiper
[not found] ` <1373977929-4253-1-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-16 12:32 ` Daniel Kiper [this message]
[not found] ` <1373977929-4253-2-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` [PATCH v2 1/7] xen: Improve calculation of beginning of virtual address space Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 2/7] elf: Properly check buf size in get_pt_note_info() Daniel Kiper
[not found] ` <1373977929-4253-3-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 3/7] xen: Take into account new frame table address since Xen 4.3 Daniel Kiper
[not found] ` <1373977929-4253-4-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 4/7] xen: Enforce page size only when xen-syms file is used Daniel Kiper
[not found] ` <1373977929-4253-5-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
[not found] ` <20130719182024.7695f88a6e4fe1160a10c74c-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-19 13:44 ` Daniel Kiper
[not found] ` <20130719134451.GF11233-ri7RxvcH2jeCtUdEpT35kVHq7GDQUN6HS7aiLakcVNdmR6Xm/wNWPw@public.gmane.org>
2013-07-22 7:35 ` Atsushi Kumagai
[not found] ` <20130722163529.39ce6b1903324f8c3a0e7a44-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-22 21:23 ` Daniel Kiper
2013-07-16 12:32 ` [PATCH v2 5/7] Do not break progress messages Daniel Kiper
[not found] ` <1373977929-4253-6-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 6/7] Mute some compiler warnings Daniel Kiper
[not found] ` <1373977929-4253-7-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 0:03 ` HATAYAMA Daisuke
[not found] ` <51E88265.1000005-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 7/7] Use elf_getshdrstrndx() instead of elf_getshstrndx() Daniel Kiper
[not found] ` <1373977929-4253-8-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
[not found] ` <20130718170322.ea01294e20c9cdc810b40eb9-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-18 12:52 ` Daniel Kiper
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=1373977929-4253-2-git-send-email-daniel.kiper@oracle.com \
--to=daniel.kiper-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=andrew.cooper3-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
--cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=kumagai-atsushi-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org \
--cc=xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).