Skip to content

Commit

Permalink
xen,kdump: handle pv domain in paddr_vmcoreinfo_note()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Petr Tesarik <[email protected]>
Reviewed-by: Boris Ostrovsky <[email protected]>
Reviewed-by: Daniel Kiper <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
  • Loading branch information
jgross1 committed May 2, 2017
1 parent 8945c08 commit 29985b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/x86/xen/mmu_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -2715,3 +2718,13 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
spin_unlock_irqrestore(&xen_reservation_lock, flags);
}
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 */

0 comments on commit 29985b0

Please sign in to comment.