All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xen,kdump: handle pv domain in paddr_vmcoreinfo_note()
@ 2017-03-31 10:14 Juergen Gross
  2017-03-31 14:02   ` [PATCH v2] xen, kdump: " Boris Ostrovsky
  2017-04-03 12:42   ` Daniel Kiper
  0 siblings, 2 replies; 27+ messages in thread
From: Juergen Gross @ 2017-03-31 10:14 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: boris.ostrovsky, ptesarik, Juergen Gross

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>
---
Changes in V2:
- use __pa_symbol() (Boris Ostrovsky)
- remove unneeded casts (Jan Beulich)

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..33ab96c 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_symbol(&vmcoreinfo_note);
+}
+#endif /* CONFIG_KEXEC_CORE */
-- 
2.10.2

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [Xen-devel] [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()
@ 2017-04-04 19:42 Daniel Kiper
  2017-04-05 11:13 ` Petr Tesarik
  2017-04-05 11:13 ` Petr Tesarik
  0 siblings, 2 replies; 27+ messages in thread
From: Daniel Kiper @ 2017-04-04 19:42 UTC (permalink / raw)
  To: jgross
  Cc: ptesarik, konrad.wilk, boris.ostrovsky, xen-devel, eric.devolder,
	dkiper, andrew.cooper3, linux-kernel

> On 03/04/17 14:42, Daniel Kiper wrote:
> > On Fri, Mar 31, 2017 at 12:14:38PM +0200, Juergen Gross wrote:
> >> 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>
> >
> > Have you tested this patch with latest crash tool? Do dom0 and Xen
> > hypervisor analysis work without any issue (at least basic commands
> > like dmesg, bt, ps, etc.)? If yes for both you can add:
> >
> > Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
>
> This patch isn't for dump analysis, but for dump creation. Petr has

I know that. However, it may have impact on crash analysis. So,
I would expect that you or anybody else in your behalf will do
at least minimal crash tool tests.

> verified that the dump is in the expected format. Please ask Petr
> for further details, e.g. user side modifications being necessary.

So, if Petr did relevant tests that is nice. However, then, IMO, this
patch begs Petr Tested-by.

Daniel

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()
@ 2017-04-04 19:42 Daniel Kiper
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Kiper @ 2017-04-04 19:42 UTC (permalink / raw)
  To: jgross
  Cc: andrew.cooper3, ptesarik, linux-kernel, xen-devel,
	boris.ostrovsky, eric.devolder, dkiper

> On 03/04/17 14:42, Daniel Kiper wrote:
> > On Fri, Mar 31, 2017 at 12:14:38PM +0200, Juergen Gross wrote:
> >> 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>
> >
> > Have you tested this patch with latest crash tool? Do dom0 and Xen
> > hypervisor analysis work without any issue (at least basic commands
> > like dmesg, bt, ps, etc.)? If yes for both you can add:
> >
> > Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
>
> This patch isn't for dump analysis, but for dump creation. Petr has

I know that. However, it may have impact on crash analysis. So,
I would expect that you or anybody else in your behalf will do
at least minimal crash tool tests.

> verified that the dump is in the expected format. Please ask Petr
> for further details, e.g. user side modifications being necessary.

So, if Petr did relevant tests that is nice. However, then, IMO, this
patch begs Petr Tested-by.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()
@ 2017-03-31 10:14 Juergen Gross
  0 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2017-03-31 10:14 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: Juergen Gross, boris.ostrovsky, ptesarik

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>
---
Changes in V2:
- use __pa_symbol() (Boris Ostrovsky)
- remove unneeded casts (Jan Beulich)

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..33ab96c 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_symbol(&vmcoreinfo_note);
+}
+#endif /* CONFIG_KEXEC_CORE */
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-04-15 14:35 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 10:14 [PATCH v2] xen,kdump: handle pv domain in paddr_vmcoreinfo_note() Juergen Gross
2017-03-31 14:02 ` Boris Ostrovsky
2017-03-31 14:02   ` [PATCH v2] xen, kdump: " Boris Ostrovsky
2017-04-03 12:42 ` [Xen-devel] " Daniel Kiper
2017-04-03 12:42   ` Daniel Kiper
2017-04-04 11:55   ` [Xen-devel] " Juergen Gross
2017-04-04 11:55   ` Juergen Gross
2017-04-11 12:45   ` Juergen Gross
2017-04-11 12:45   ` [Xen-devel] " Juergen Gross
2017-04-11 13:00     ` Daniel Kiper
2017-04-11 14:59       ` Petr Tesarik
2017-04-11 17:20         ` Daniel Kiper
2017-04-11 17:20         ` [Xen-devel] " Daniel Kiper
2017-04-14 16:53           ` Petr Tesarik
2017-04-14 16:53           ` [Xen-devel] " Petr Tesarik
2017-04-14 22:26             ` Daniel Kiper
2017-04-15 14:35               ` Petr Tesarik
2017-04-15 14:35               ` Petr Tesarik
2017-04-14 22:26             ` Daniel Kiper
2017-04-11 14:59       ` Petr Tesarik
2017-04-11 13:00     ` Daniel Kiper
  -- strict thread matches above, loose matches on Subject: below --
2017-04-04 19:42 [Xen-devel] " Daniel Kiper
2017-04-05 11:13 ` Petr Tesarik
2017-04-07  9:16   ` Petr Tesarik
2017-04-07  9:16   ` [Xen-devel] " Petr Tesarik
2017-04-10 20:49     ` Daniel Kiper
2017-04-11 10:49       ` Petr Tesarik
2017-04-05 11:13 ` Petr Tesarik
2017-04-04 19:42 Daniel Kiper
2017-03-31 10:14 Juergen Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.