xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec
@ 2015-06-03 13:35 Vitaly Kuznetsov
  2015-06-03 13:35 ` [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset Vitaly Kuznetsov
                   ` (6 more replies)
  0 siblings, 7 replies; 39+ messages in thread
From: Vitaly Kuznetsov @ 2015-06-03 13:35 UTC (permalink / raw)
  To: xen-devel, Jan Beulich, Tim Deegan
  Cc: Andrew Jones, Julien Grall, Wei Liu, Ian Campbell,
	Stefano Stabellini, Andrew Cooper, Ian Jackson, Olaf Hering,
	David Vrabel, Keir Fraser, Daniel De Graaf

Jan and Tim,

last week you expressed some concerns about if the toolstack-based
approach to PVHVM guest kexec is the best. Here you can see the 'reset
everything' approach to the same problem. It is the bare minimum of what
should be done to make it possible for the new kernel to boot. Despite
the fact that this implementation is much smaller in size and that it
doesn't require any toolstack changes I'm personally in favor of the
previous toolstack-based approach as it looks more general, less fragile
and easier to support to me. Please let me know your thoughts.

I used SCHEDOP_ interface here as DOMCTL_* is not currently supported in
Linux kernel and I seriously doubt we need to support something different
from DOMID_SELF for soft reset.

Current Linux kernel requires two changes to make use of these hypervisor
changes:
1) As XS_RESET_WATCHES is not supported by oxenstored we need to try removing
the watch in case add operation failed, e.g.:
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -712,6 +712,10 @@ int register_xenbus_watch(struct xenbus_watch *watch)
        spin_unlock(&watches_lock);
 
        err = xs_watch(watch->node, token);
+       if (err) {
+               if (!xs_unwatch(watch->node, token))
+                       err = xs_watch(watch->node, token);
+       }
 
        if (err) {
                spin_lock(&watches_lock);

2) HYPERVISOR_sched_op(SCHEDOP_soft_reset, NULL) is supposed to be called in
kexec/kdump situation (via machine_ops.shutdown and machine_ops.crash_shutdown
handlers).

v7 of the toolstack-based approach is available here:
http://comments.gmane.org/gmane.comp.emulators.xen.devel/245183
(for some reason it is missing on http://lists.xen.org/archives/html/xen-devel/2015-05/,
there are no messages in May after May, 26 and this series was sent on May, 27)

Vitaly Kuznetsov (4):
  xen: evtchn: make evtchn_reset() ready for soft reset
  xen: grant_table: implement grant_table_soft_reset()
  xen: implement SCHEDOP_soft_reset
  xen: arch-specific hooks for domain_soft_reset()

 xen/arch/arm/domain.c         |  5 +++
 xen/arch/x86/domain.c         | 73 +++++++++++++++++++++++++++++++++++++++++++
 xen/common/domain.c           | 39 ++++++++++++++++++++---
 xen/common/event_channel.c    | 52 +++++++++++++++++-------------
 xen/common/grant_table.c      | 62 ++++++++++++++++++++++++++++++++++++
 xen/common/schedule.c         |  4 +++
 xen/include/public/sched.h    |  7 +++++
 xen/include/xen/domain.h      |  4 +++
 xen/include/xen/event.h       |  3 ++
 xen/include/xen/grant_table.h |  6 ++++
 xen/include/xen/sched.h       |  1 +
 11 files changed, 231 insertions(+), 25 deletions(-)

-- 
1.9.3

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

end of thread, other threads:[~2015-06-25  9:57 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-03 13:35 [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec Vitaly Kuznetsov
2015-06-03 13:35 ` [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset Vitaly Kuznetsov
2015-06-04 14:05   ` Tim Deegan
2015-06-04 15:19     ` David Vrabel
2015-06-04 15:47       ` Tim Deegan
2015-06-05  8:52         ` Jan Beulich
2015-06-05  8:58           ` Ian Campbell
2015-06-05  9:07             ` Jan Beulich
2015-06-08 14:10   ` Jan Beulich
2015-06-08 15:05     ` Vitaly Kuznetsov
2015-06-03 13:35 ` [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset() Vitaly Kuznetsov
2015-06-04 14:11   ` Tim Deegan
2015-06-04 15:22     ` David Vrabel
2015-06-04 15:44       ` Tim Deegan
2015-06-08 14:26   ` Jan Beulich
2015-06-08 14:58     ` Vitaly Kuznetsov
2015-06-08 15:35       ` Jan Beulich
2015-06-03 13:35 ` [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset Vitaly Kuznetsov
2015-06-08 14:31   ` Jan Beulich
2015-06-22 16:00     ` Vitaly Kuznetsov
2015-06-22 16:06       ` Jan Beulich
2015-06-22 16:24         ` Vitaly Kuznetsov
2015-06-23  7:13           ` Jan Beulich
2015-06-23 12:10             ` Vitaly Kuznetsov
2015-06-23 12:52               ` Jan Beulich
2015-06-03 13:35 ` [PATCH RFC 4/4] xen: arch-specific hooks for domain_soft_reset() Vitaly Kuznetsov
2015-06-04 14:19   ` Tim Deegan
2015-06-22  9:44     ` Vitaly Kuznetsov
2015-06-25  9:57       ` Tim Deegan
2015-06-08 15:32   ` Jan Beulich
2015-06-08 15:59     ` Vitaly Kuznetsov
2015-06-04 14:22 ` [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec Tim Deegan
2015-06-08 15:38 ` Ian Jackson
2015-06-08 15:53 ` Wei Liu
2015-06-08 17:43   ` Wei Liu
2015-06-09  8:19     ` Dave Scott
2015-06-09  9:29       ` Wei Liu
2015-06-09  9:38         ` Wei Liu
2015-06-09 10:02           ` Dave Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).