Daniel Kiper
2012-Nov-13 16:12 UTC
[PATCH 2/5] xen: Use init_tss array or per_cpu__init_tss
Newer Xen versions (at least 4.2) use per_cpu__init_tss instead of init_tss array. Take into account that. Signed-off-by: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> diff -Npru crash-6.1.0.orig/x86.c crash-6.1.0/x86.c --- crash-6.1.0.orig/x86.c 2012-11-13 14:45:58.000000000 +0100 +++ crash-6.1.0/x86.c 2012-11-13 14:48:13.000000000 +0100 @@ -5471,9 +5471,16 @@ x86_get_stackbase_hyper(ulong task) if (!xen_hyper_test_pcpu_id(pcpu)) { error(FATAL, "invalid pcpu number\n"); } - init_tss = symbol_value("init_tss"); + + if (symbol_exists("init_tss")) { + init_tss = symbol_value("init_tss"); + init_tss += XEN_HYPER_SIZE(tss_struct) * pcpu; + } else { + init_tss = symbol_value("per_cpu__init_tss"); + init_tss = xen_hyper_per_cpu(init_tss, pcpu); + } + buf = GETBUF(XEN_HYPER_SIZE(tss_struct)); - init_tss += XEN_HYPER_SIZE(tss_struct) * pcpu; if (!readmem(init_tss, KVADDR, buf, XEN_HYPER_SIZE(tss_struct), "init_tss", RETURN_ON_ERROR)) { error(FATAL, "cannot read init_tss.\n");
Maybe Matching Threads
- [PATCH v2 3/6] x86/xen: Read variables from dynamically allocated per_cpu data
- [RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
- [RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
- [PATCH] paravirt_ops x86_64 , take 2
- [PATCH] paravirt_ops x86_64 , take 2