FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-17-2011, 10:39 AM
Petr Tesarik
 
Default Make XEN_VIRT_START depend on Xen version

The XEN_VIRT_START constant was changed in Xen4, so it can no longer be a
simple define. Initialize it to its correct value depending on the Xen major
version.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
xen_hyper.c | 7 +++++++
xen_hyper_defs.h | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)

--- a/xen_hyper.c
+++ b/xen_hyper.c
@@ -42,6 +42,13 @@ xen_hyper_init(void)
long member_offset;
#endif

+#ifdef X86_64
+ if (xen_major_version() >= 4)
+ xht->xen_virt_start = 0xffff82c480000000;
+ else
+ xht->xen_virt_start = 0xffff828c80000000;
+#endif
+
if (machine_type("X86_64") &&
symbol_exists("xen_phys_start") && !xen_phys_start())
error(WARNING,
--- a/xen_hyper_defs.h
+++ b/xen_hyper_defs.h
@@ -65,7 +65,7 @@
#define DIRECTMAP_VIRT_START (0xffff830000000000)
#define DIRECTMAP_VIRT_END (0xffff840000000000)
#define PAGE_OFFSET_XEN_HYPER DIRECTMAP_VIRT_START
-#define XEN_VIRT_START (0xffff828c80000000)
+#define XEN_VIRT_START (xht->xen_virt_start)
#define XEN_VIRT_ADDR(vaddr)
(((vaddr) >= XEN_VIRT_START) && ((vaddr) < DIRECTMAP_VIRT_START))
#endif
@@ -408,6 +408,9 @@ struct xen_hyper_table {
int percpu_shift;
int idle_vcpu_size;
ulong *idle_vcpu_array;
+#ifdef X86_64
+ ulong xen_virt_start;
+#endif
};

struct xen_hyper_dumpinfo_context {

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 11:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org