Hello community, here is the log from the commit of package crash for openSUSE:Factory checked in at Mon Jan 10 14:40:42 CET 2011. -------- --- crash/crash.changes 2011-01-05 01:18:46.000000000 +0100 +++ /mounts/work_src_done/STABLE/crash/crash.changes 2011-01-07 16:47:56.000000000 +0100 @@ -1,0 +2,17 @@ +Fri Jan 7 15:46:51 UTC 2011 - ptesarik@novell.com + +- crash-xen-per_cpu-init_tss.patch: init_tss is a per-cpu variable + in Xen-4.0.0 (bnc#612128). +- crash-xen-x86_64-increase-max-vcpus.patch: x86_64 can have up to + 8192 virtual CPUs with Xen-4.0.0 (bnc#612128). +- crash-xen-domain_vcpu.patch: Xen-4.0.0. vcpu array is no longer + embedded in struct domain (bnc#612128). +- crash-xen-opt_sched.patch: opt_sched is __initdata in Xen-4.0.0, + so it's value is not available in the crash dump. Use opt as a + replacement (bnc#612128). +- crash-xen_virt_start.patch: account for the changed value of + XEN_VIRT_START in Xen-4.0.0 (bnc#612128). +- crash-xen-per_cpu_shift.patch: correctly determine PERCPU_SHIFT + for Xen syms (bnc#612128). + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- crash-xen-domain_vcpu.patch crash-xen-opt_sched.patch crash-xen-per_cpu-init_tss.patch crash-xen-per_cpu_shift.patch crash-xen_virt_start.patch crash-xen-x86_64-increase-max-vcpus.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crash.spec ++++++ --- /var/tmp/diff_new_pack.9tQWh7/_old 2011-01-10 14:40:20.000000000 +0100 +++ /var/tmp/diff_new_pack.9tQWh7/_new 2011-01-10 14:40:20.000000000 +0100 @@ -30,7 +30,7 @@ Url: http://people.redhat.com/anderson/ Summary: Crash utility for live systems; netdump, diskdump, LKCD or mcore dumpfiles Version: %{crash_version} -Release: 1 +Release: 2 License: GFDLv1.2 Group: Development/Tools/Debuggers Source: %{name}-%{crash_version}.tar.gz @@ -47,6 +47,12 @@ Patch7: %{name}-rl_digit_loop-return.patch Patch8: %{name}-missing-declarations.patch Patch9: %{name}-compressed-booted-kernel +Patch10: %{name}-xen-per_cpu_shift.patch +Patch11: %{name}-xen_virt_start.patch +Patch12: %{name}-xen-per_cpu-init_tss.patch +Patch13: %{name}-xen-x86_64-increase-max-vcpus.patch +Patch14: %{name}-xen-domain_vcpu.patch +Patch15: %{name}-xen-opt_sched.patch Patch90: %{name}-sial-ps-2.6.29.diff BuildRequires: bison flex ncurses-devel zlib-devel Requires: /usr/bin/nm @@ -134,6 +140,12 @@ %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 ## SIAL patches cd sial-scripts-%{scripts_version} %patch90 -p1 ++++++ crash-xen-domain_vcpu.patch ++++++ --- xen_hyper.c | 40 +++++++++++++++++++++++++++++++++++++--- xen_hyper_defs.h | 1 + 2 files changed, 38 insertions(+), 3 deletions(-) --- a/xen_hyper.c +++ b/xen_hyper.c @@ -219,6 +219,7 @@ xen_hyper_domain_init(void) XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shutting_down, "domain", "is_shutting_down"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shut_down, "domain", "is_shut_down"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_vcpu, "domain", "vcpu"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_max_vcpus, "domain", "max_vcpus"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_arch, "domain", "arch"); XEN_HYPER_STRUCT_SIZE_INIT(arch_shared_info, "arch_shared_info"); @@ -1207,6 +1208,8 @@ struct xen_hyper_domain_context * xen_hyper_store_domain_context(struct xen_hyper_domain_context *dc, ulong domain, char *dp) { + unsigned int max_vcpus; + char *vcpup; int i; dc->domain = domain; @@ -1244,9 +1247,40 @@ xen_hyper_store_domain_context(struct xe dc->domain_flags = XEN_HYPER_DOMF_ERROR; } dc->evtchn = ULONG(dp + XEN_HYPER_OFFSET(domain_evtchn)); - for (i = 0; i < XEN_HYPER_MAX_VIRT_CPUS; i++) { - dc->vcpu[i] = ULONG(dp + XEN_HYPER_OFFSET(domain_vcpu) + i*sizeof(void *)); - if (dc->vcpu[i]) XEN_HYPER_NR_VCPUS_IN_DOM(dc)++; + + if (XEN_HYPER_VALID_MEMBER(domain_max_vcpus)) { + max_vcpus = UINT(dp + XEN_HYPER_OFFSET(domain_max_vcpus)); + } else { + max_vcpus = XEN_HYPER_MAX_VIRT_CPUS; + } + if (MEMBER_TYPE("domain", "vcpu") == TYPE_CODE_ARRAY) + vcpup = dp + XEN_HYPER_OFFSET(domain_vcpu); + else { + ulong vcpu_array = ULONG(dp + XEN_HYPER_OFFSET(domain_vcpu)); + if (vcpu_array && max_vcpus) { + if (!(vcpup = + malloc(max_vcpus * sizeof(void *)))) { + error(FATAL, "cannot malloc VCPU array for domain %lx.", + domain); + } + if (!readmem(vcpu_array, KVADDR, + vcpup, max_vcpus * sizeof(void*), + "VCPU array", RETURN_ON_ERROR)) { + error(FATAL, "cannot read VCPU array for domain %lx.", + domain); + } + } else { + vcpup = NULL; + } + } + if (vcpup) { + for (i = 0; i < max_vcpus; i++) { + dc->vcpu[i] = ULONG(vcpup + i*sizeof(void *)); + if (dc->vcpu[i]) XEN_HYPER_NR_VCPUS_IN_DOM(dc)++; + } + if (vcpup != dp + XEN_HYPER_OFFSET(domain_vcpu)) { + free(vcpup); + } } return dc; --- a/xen_hyper_defs.h +++ b/xen_hyper_defs.h @@ -674,6 +674,7 @@ struct xen_hyper_offset_table { long domain_is_shutting_down; long domain_is_shut_down; long domain_vcpu; + long domain_max_vcpus; long domain_arch; #ifdef IA64 /* mm_struct */ ++++++ crash-xen-opt_sched.patch ++++++ --- xen_hyper.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) --- a/xen_hyper.c +++ b/xen_hyper.c @@ -445,13 +445,21 @@ xen_hyper_schedule_init(void) error(FATAL, "cannot malloc scheduler struct space.\n"); } buf = GETBUF(XEN_HYPER_SCHEDULER_NAME); - opt_sched = symbol_value("opt_sched"); + scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name); + if (symbol_exists("ops")) { + if (!readmem(symbol_value("ops") + scheduler_opt_name, KVADDR, + &opt_sched, sizeof(ulong), "ops.opt_name", + RETURN_ON_ERROR)) { + error(FATAL, "cannot read ops.opt_name.\n"); + } + } else { + opt_sched = symbol_value("opt_sched"); + } if (!readmem(opt_sched, KVADDR, xhscht->opt_sched, XEN_HYPER_OPT_SCHED_SIZE, "opt_sched,", RETURN_ON_ERROR)) { error(FATAL, "cannot read opt_sched,.\n"); } schedulers = symbol_value("schedulers"); - scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name); addr = schedulers; while (xhscht->name == NULL) { if (!readmem(addr, KVADDR, schedulers_buf, ++++++ crash-xen-per_cpu-init_tss.patch ++++++ --- xen_hyper.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) --- a/xen_hyper.c +++ b/xen_hyper.c @@ -319,6 +319,7 @@ xen_hyper_x86_pcpu_init(void) struct xen_hyper_pcpu_context *pcc; char *buf, *bp; int i, cpuid; + int flag; XEN_HYPER_MEMBER_OFFSET_INIT(cpu_info_guest_cpu_user_regs, "cpu_info", "guest_cpu_user_regs"); XEN_HYPER_MEMBER_OFFSET_INIT(cpu_info_processor_id, "cpu_info", "processor_id"); @@ -330,11 +331,21 @@ xen_hyper_x86_pcpu_init(void) /* get physical cpu context */ xen_hyper_alloc_pcpu_context_space(XEN_HYPER_MAX_CPUS()); - init_tss_base = symbol_value("init_tss"); + if (symbol_exists("per_cpu__init_tss")) { + init_tss_base = symbol_value("per_cpu__init_tss"); + flag = TRUE; + } else { + init_tss_base = symbol_value("init_tss"); + flag = FALSE; + } buf = GETBUF(XEN_HYPER_SIZE(tss_struct)); for_cpu_indexes(i, cpuid) { - init_tss = init_tss_base + XEN_HYPER_SIZE(tss_struct) * cpuid; + if (flag) + init_tss = xen_hyper_per_cpu(init_tss_base, cpuid); + else + init_tss = init_tss_base + + XEN_HYPER_SIZE(tss_struct) * cpuid; if (!readmem(init_tss, KVADDR, buf, XEN_HYPER_SIZE(tss_struct), "init_tss", RETURN_ON_ERROR)) { error(FATAL, "cannot read init_tss.\n"); ++++++ crash-xen-per_cpu_shift.patch ++++++ --- ia64.c | 3 +++ symbols.c | 3 +++ x86.c | 3 +++ x86_64.c | 3 +++ 4 files changed, 12 insertions(+) --- a/ia64.c +++ b/ia64.c @@ -711,6 +711,9 @@ ia64_verify_symbol(const char *name, ulo if (!name || !strlen(name)) return FALSE; + if (XEN_HYPER_MODE() && STREQ(name, "__per_cpu_shift")) + return TRUE; + if (CRASHDEBUG(8)) fprintf(fp, "%016lx %s\n", value, name); --- a/symbols.c +++ b/symbols.c @@ -678,6 +678,9 @@ store_sysmap_symbols(void) static ulong relocate(ulong symval, char *symname, int first_symbol) { + if (XEN_HYPER_MODE()) + return symval; + switch (kt->flags & (RELOC_SET|RELOC_FORCE)) { case RELOC_SET: --- a/x86.c +++ b/x86.c @@ -3785,6 +3785,9 @@ x86_is_task_addr(ulong task) static int x86_verify_symbol(const char *name, ulong value, char type) { + if (XEN_HYPER_MODE() && STREQ(name, "__per_cpu_shift")) + return TRUE; + if (CRASHDEBUG(8) && name && strlen(name)) fprintf(fp, "%08lx %s\n", value, name); --- a/x86_64.c +++ b/x86_64.c @@ -1989,6 +1989,9 @@ x86_64_verify_symbol(const char *name, u if (!name || !strlen(name)) return FALSE; + if (XEN_HYPER_MODE() && STREQ(name, "__per_cpu_shift")) + return TRUE; + if (!(machdep->flags & KSYMS_START)) { if (STREQ(name, "_text") || STREQ(name, "_stext")) { machdep->flags |= KSYMS_START; ++++++ crash-xen_virt_start.patch ++++++ --- 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-xen-x86_64-increase-max-vcpus.patch ++++++ --- xen_hyper_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/xen_hyper_defs.h +++ b/xen_hyper_defs.h @@ -123,7 +123,7 @@ typedef uint32_t Elf_Word; #define XEN_HYPER_HZ 100 #endif #ifdef X86_64 -#define XEN_HYPER_MAX_VIRT_CPUS (32) +#define XEN_HYPER_MAX_VIRT_CPUS (8192) #define XEN_HYPER_HZ 100 #endif #ifdef IA64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de