aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2017-04-11 12:14:26 -0400
committerJuergen Gross <jgross@suse.com>2017-05-02 05:13:17 -0400
commit29985b09613ba106a1ed0496988636d288600515 (patch)
treed4c18eeb6a811b70c82f4b6787ede55acc83a906
parent8945c08e2b148be926b5f1aa653b2021a127e905 (diff)
xen,kdump: handle pv domain in paddr_vmcoreinfo_note()
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>
-rw-r--r--arch/x86/xen/mmu_pv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index c98bfb9f0248..9d9ae6650aa1 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -49,6 +49,9 @@
49#include <linux/memblock.h> 49#include <linux/memblock.h>
50#include <linux/seq_file.h> 50#include <linux/seq_file.h>
51#include <linux/crash_dump.h> 51#include <linux/crash_dump.h>
52#ifdef CONFIG_KEXEC_CORE
53#include <linux/kexec.h>
54#endif
52 55
53#include <trace/events/xen.h> 56#include <trace/events/xen.h>
54 57
@@ -2715,3 +2718,13 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
2715 spin_unlock_irqrestore(&xen_reservation_lock, flags); 2718 spin_unlock_irqrestore(&xen_reservation_lock, flags);
2716} 2719}
2717EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region); 2720EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
2721
2722#ifdef CONFIG_KEXEC_CORE
2723phys_addr_t paddr_vmcoreinfo_note(void)
2724{
2725 if (xen_pv_domain())
2726 return virt_to_machine(&vmcoreinfo_note).maddr;
2727 else
2728 return __pa_symbol(&vmcoreinfo_note);
2729}
2730#endif /* CONFIG_KEXEC_CORE */