From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com, ptesarik@suse.com,
Juergen Gross <jgross@suse.com>
Subject: [PATCH] xen,kdump: handle pv domain in paddr_vmcoreinfo_note()
Date: Thu, 30 Mar 2017 16:18:24 +0200 [thread overview]
Message-ID: <20170330141824.4113-1-jgross@suse.com> (raw)
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() only,
but being attributed "weak" it can be replaced easily in Xen case.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
This patch needs to be rebased on top of Vitaly's series to split
pv- and hvm-code. I'll do this as soon as his series is in the Xen
tree in its final form.
---
arch/x86/xen/mmu.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 37cb5aa..0e2b8d7 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -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>
@@ -2903,3 +2906,13 @@ int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
return -EINVAL;
}
EXPORT_SYMBOL_GPL(xen_unmap_domain_gfn_range);
+
+#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((unsigned long)(char *)&vmcoreinfo_note);
+}
+#endif /* CONFIG_KEXEC_CORE */
--
2.10.2
next reply other threads:[~2017-03-30 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 14:18 Juergen Gross [this message]
2017-03-30 14:51 ` Boris Ostrovsky
2017-03-31 8:03 ` Juergen Gross
2017-03-30 15:05 ` [Xen-devel] [PATCH] xen, kdump: " Jan Beulich
[not found] ` <58DD3AF6020000780014ABAE@suse.com>
2017-03-31 8:01 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170330141824.4113-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ptesarik@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®