search for: xen_hyper_per_cpu

Displaying 2 results from an estimated 2 matches for "xen_hyper_per_cpu".

2012 Aug 10
0
[PATCH v2 3/6] x86/xen: Read variables from dynamically allocated per_cpu data
...ash-6.0.8.orig/xen_hyper_defs.h crash-6.0.8/xen_hyper_defs.h --- crash-6.0.8.orig/xen_hyper_defs.h 2012-06-29 16:59:18.000000000 +0200 +++ crash-6.0.8/xen_hyper_defs.h 2012-07-05 15:50:19.000000000 +0200 @@ -136,7 +136,13 @@ typedef uint32_t Elf_Word; #if defined(X86) || defined(X86_64) #define xen_hyper_per_cpu(var, cpu) \ - ((ulong)(var) + (((ulong)(cpu))<<xht->percpu_shift)) + ({ ulong __var_addr; \ + if (xht->__per_cpu_offset) \ + __var_addr = (xht->flags & XEN_HYPER_SMP) ? \ + ((ulong)(var) + xht->__per_cpu_offset[cpu]) : (ulong)(var); \ + else \ + __var_addr = (ulong)...
2012 Nov 13
0
[PATCH 2/5] xen: Use init_tss array or per_cpu__init_tss
...umber\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");