From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Olaf Hering <olaf@aepfle.de>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 01/11] kexec: add kexec_is_loaded function
Date: Fri, 29 Jul 2011 13:34:34 -0400 [thread overview]
Message-ID: <20110729173434.GA7745@dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1107291535010.12963@kaball-desktop>
On Fri, Jul 29, 2011 at 03:45:23PM +0100, Stefano Stabellini wrote:
> On Thu, 28 Jul 2011, Olaf Hering wrote:
> > Add a new function kexec_is_loaded to be used by subsequent changes for
> > kexec in Xen HVM guests with PV drivers loaded.
.. which is called 'PVonHVM'
> >
> > A kexec reboot in a HVM guest needs to unregister all resources such as
Not HVM - PVonHVM.
> > xenstore watches and virqs, otherwise the kexec kernel can not bind to
> > these resources again. But the unregister only needs to happen during a
> > kexec boot because the guest remains the same from the Xen point of
> > view. A normal reboot will shutdown and destroy the entire guest with
> > all its resources, then the guest will start again with a different
> > domain_id number. So doing all the unregister work would only delay
> > normal reboots.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
You need to CC the maintainers of these files too.
> >
> > ---
> > include/linux/kexec.h | 3 ++-
> > kernel/kexec.c | 8 +++++++-
> > kernel/ksysfs.c | 2 +-
> > 3 files changed, 10 insertions(+), 3 deletions(-)
> >
> > Index: linux-3.0/include/linux/kexec.h
> > ===================================================================
> > --- linux-3.0.orig/include/linux/kexec.h
> > +++ linux-3.0/include/linux/kexec.h
And make sure to use git format-patch to come up with the patches.
> > @@ -126,6 +126,7 @@ extern asmlinkage long compat_sys_kexec_
> > extern struct page *kimage_alloc_control_pages(struct kimage *image,
> > unsigned int order);
> > extern void crash_kexec(struct pt_regs *);
> > +extern int kexec_is_loaded(void);
> > int kexec_should_crash(struct task_struct *);
> > void crash_save_cpu(struct pt_regs *regs, int cpu);
> > void crash_save_vmcoreinfo(void);
> > @@ -156,7 +157,6 @@ unsigned long paddr_vmcoreinfo_note(void
> > #define VMCOREINFO_CONFIG(name) \
> > vmcoreinfo_append_str("CONFIG_%s=y\n", #name)
> >
> > -extern struct kimage *kexec_image;
> > extern struct kimage *kexec_crash_image;
> >
> > #ifndef kexec_flush_icache_page
> > @@ -214,6 +214,7 @@ void crash_free_reserved_phys_range(unsi
> > struct pt_regs;
> > struct task_struct;
> > static inline void crash_kexec(struct pt_regs *regs) { }
> > +static inline int kexec_is_loaded(void) { return 0; }
> > static inline int kexec_should_crash(struct task_struct *p) { return 0; }
> > #endif /* CONFIG_KEXEC */
> > #endif /* LINUX_KEXEC_H */
> > Index: linux-3.0/kernel/kexec.c
> > ===================================================================
> > --- linux-3.0.orig/kernel/kexec.c
> > +++ linux-3.0/kernel/kexec.c
> > @@ -934,7 +934,7 @@ static int kimage_load_segment(struct ki
> > * kexec does not sync, or unmount filesystems so if you need
> > * that to happen you need to do that yourself.
> > */
> > -struct kimage *kexec_image;
> > +static struct kimage *kexec_image;
> > struct kimage *kexec_crash_image;
> >
> > static DEFINE_MUTEX(kexec_mutex);
> > @@ -1567,3 +1567,9 @@ int kernel_kexec(void)
> > mutex_unlock(&kexec_mutex);
> > return error;
> > }
> > +
> > +int kexec_is_loaded(void)
> > +{
> > + return !!kexec_image;
> > +}
> > +EXPORT_SYMBOL_GPL(kexec_is_loaded);
>
> Wouldn't this return true just if a kexec_image is loaded no matter if
> this is a normal shutdown or if it is an actually kexec reboot?
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-07-29 17:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 13:23 [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Olaf Hering
2011-07-28 13:23 ` [PATCH 01/11] kexec: add kexec_is_loaded function Olaf Hering
2011-07-29 14:45 ` Stefano Stabellini
2011-07-29 17:34 ` Konrad Rzeszutek Wilk [this message]
2011-08-01 12:59 ` Olaf Hering
2011-07-28 13:23 ` [PATCH 02/11] xen: remove BUG_ON from xen_teardown_timer Olaf Hering
2011-07-28 13:23 ` [PATCH 03/11] xen: use static initializers in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 04/11] xen/hvm kexec: unregister timer interrupt during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 05/11] xen/hvm kexec: unregister debugirq " Olaf Hering
2011-07-29 17:45 ` Konrad Rzeszutek Wilk
2011-07-28 13:23 ` [PATCH 06/11] xen/hvm kexec: unregister shutdown+sysrq watches " Olaf Hering
2011-07-28 13:23 ` [PATCH 07/11] xen/hvm kexec: unregister memory/target watch in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 08/11] xen/hvm kexec: unregister the watch of the "backend" node during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 09/11] xen/hvm kexec: unregister the watch of the "device" " Olaf Hering
2011-07-28 13:23 ` [PATCH 10/11] xen kexec: reset device state to Initializing " Olaf Hering
2011-07-28 13:23 ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Olaf Hering
2011-07-29 14:47 ` Stefano Stabellini
2011-08-01 12:58 ` Olaf Hering
2011-08-02 21:04 ` Stefano Stabellini
2011-08-02 22:20 ` Where can I find current (and up to date) documentation for xen 4.1.1? Mark Schneider
2011-08-02 22:42 ` xen 4.1.1 - errors in xend-debug.log: cat: /sys/bus/scsi/devices/host0/vendor: No such file or directory Mark Schneider
2011-08-02 22:48 ` [2011-08-02 20:54:36 2721] WARNING (XendAPI:708) API call: VBD.set_device not found Mark Schneider
2011-08-02 23:29 ` xen 4.1.1 - Error: Device 0 (vif) could not be connected. Hotplug scripts not working Mark Schneider
2011-08-03 1:02 ` Boris Derzhavets
2011-08-03 8:14 ` Mark Schneider
2011-08-03 16:43 ` Pasi Kärkkäinen
2011-08-03 4:55 ` Where can I find current (and up to date) documentation for xen 4.1.1? Pasi Kärkkäinen
2011-08-09 9:07 ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Ian Campbell
2011-07-28 13:43 ` [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Keir Fraser
2011-08-01 13:00 ` Olaf Hering
2011-07-29 17:35 ` Konrad Rzeszutek Wilk
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=20110729173434.GA7745@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 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.