diff mbox series

[v8,4/5] crash: export paddr_vmcoreinfo_note()

Message ID 20171123140206.3911-5-marcandre.lureau@redhat.com
State New
Headers show
Series fw_cfg: add DMA operations & etc/vmcoreinfo support | expand

Commit Message

Marc-André Lureau Nov. 23, 2017, 2:02 p.m. UTC
The following patch is going to use the symbol from the fw_cfg module,
to call the function and write the note location details in the
vmcoreinfo entry, so qemu can produce dumps with the vmcoreinfo note.

CC: Andrew Morton <akpm@linux-foundation.org>
CC: Baoquan He <bhe@redhat.com>
CC: Dave Young <dyoung@redhat.com>
CC: Dave Young <dyoung@redhat.com>
CC: Hari Bathini <hbathini@linux.vnet.ibm.com>
CC: Tony Luck <tony.luck@intel.com>
CC: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gabriel Somlo <somlo@cmu.edu>
---
 kernel/crash_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Nov. 23, 2017, 2:36 p.m. UTC | #1
On Thu, Nov 23, 2017 at 03:02:05PM +0100, Marc-André Lureau wrote:
> The following patch is going to use the symbol from the fw_cfg module,
> to call the function and write the note location details in the
> vmcoreinfo entry, so qemu can produce dumps with the vmcoreinfo note.

Sounds like fw_cfg should be moved to be built in only instead of
exporting such a symbol address.
Michael S. Tsirkin Nov. 24, 2017, 4:20 a.m. UTC | #2
On Thu, Nov 23, 2017 at 06:36:57AM -0800, Christoph Hellwig wrote:
> On Thu, Nov 23, 2017 at 03:02:05PM +0100, Marc-André Lureau wrote:
> > The following patch is going to use the symbol from the fw_cfg module,
> > to call the function and write the note location details in the
> > vmcoreinfo entry, so qemu can produce dumps with the vmcoreinfo note.
> 
> Sounds like fw_cfg should be moved to be built in only instead of
> exporting such a symbol address.

Point is, all fw cfg does is export it on to the hypervisor, so it will
have to be supported forever.  If it's safe to export it to the
hypervisor then for sure it's also safe to export it to modules.
diff mbox series

Patch

diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index b3663896278e..2394f0501c65 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -376,6 +376,7 @@  phys_addr_t __weak paddr_vmcoreinfo_note(void)
 {
 	return __pa(vmcoreinfo_note);
 }
+EXPORT_SYMBOL(paddr_vmcoreinfo_note);
 
 static int __init crash_save_vmcoreinfo_init(void)
 {