]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen,kdump: handle pv domain in paddr_vmcoreinfo_note()
authorJuergen Gross <jgross@suse.com>
Tue, 11 Apr 2017 16:14:26 +0000 (18:14 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Sep 2017 04:37:57 +0000 (21:37 -0700)
For kdump to work correctly it needs the physical address of
vmcoreinfo_note. When running as dom0 this means the virtual address
has to be translated to the related machine address.

paddr_vmcoreinfo_note() is meant to do the translation via
__pa_symbol() only, but being attributed "weak" it can be replaced
easily in Xen case.

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
OraBug: 26662731

(cherry picked from commit 29985b09613ba106a1ed0496988636d288600515)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Conflicts:
arch/x86/xen/mmu_pv.c
( no mmu_pv.c in our tree)

arch/x86/xen/mmu.c

index fab497f954447901e4f8ce89b13aa226a650098a..b68043df2e6715bf1015c90ff4414e7579b100f1 100644 (file)
@@ -49,6 +49,9 @@
 #include <linux/memblock.h>
 #include <linux/seq_file.h>
 #include <linux/crash_dump.h>
+#ifdef CONFIG_KEXEC_CORE
+#include <linux/kexec.h>
+#endif
 
 #include <trace/events/xen.h>
 
@@ -2692,6 +2695,16 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
 }
 EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
 
+#ifdef CONFIG_KEXEC_CORE
+phys_addr_t paddr_vmcoreinfo_note(void)
+{
+       if (xen_pv_domain())
+               return virt_to_machine(&vmcoreinfo_note).maddr;
+       else
+               return __pa_symbol(&vmcoreinfo_note);
+}
+#endif /* CONFIG_KEXEC_CORE */
+
 #ifdef CONFIG_XEN_PVHVM
 #ifdef CONFIG_PROC_VMCORE
 /*