[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Crash-utility] [PATCH] Fix missing 'init_tss' symbol in Xen4




----- Original Message -----
> In Xen4, init_tss is a per-cpu symbol. Without this patch, crash fails on Xen4
> hypervisor dumps during initialization with 'crash: cannot
> resolve "init_tss"'.
 
Queued for the next release.

Thanks,
  Dave

> Signed-off-by: Petr Tesarik <ptesarik suse cz>
> ---
> xen_hyper.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
> 
> --- a/xen_hyper.c
> +++ b/xen_hyper.c
> @@ -319,6 +319,7 @@
> 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 @@
> 
> /* 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-utility mailing list
> Crash-utility redhat com
> https://www.redhat.com/mailman/listinfo/crash-utility


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]