From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdDKQOd (ORCPT ); Tue, 11 Apr 2017 12:14:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:33290 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbdDKQOb (ORCPT ); Tue, 11 Apr 2017 12:14:31 -0400 From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com, ptesarik@suse.com, daniel.kiper@oracle.com, Juergen Gross Subject: [PATCH v3] xen,kdump: handle pv domain in paddr_vmcoreinfo_note() Date: Tue, 11 Apr 2017 18:14:26 +0200 Message-Id: <20170411161426.28112-1-jgross@suse.com> X-Mailer: git-send-email 2.12.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Petr Tesarik Reviewed-by: Boris Ostrovsky Reviewed-by: Daniel Kiper --- Changes in V3: - rebased to recent Xen patches Changes in V2: - use __pa_symbol() (Boris Ostrovsky) - remove unneeded casts (Jan Beulich) --- arch/x86/xen/mmu_pv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 284d189f40dd..9657187bc7bd 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -49,6 +49,9 @@ #include #include #include +#ifdef CONFIG_KEXEC_CORE +#include +#endif #include @@ -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 */ -- 2.12.0