WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 0/3] [v5] kexec and kdump for Xen PVonHVM guests

To: linux-kernel@xxxxxxxxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH 0/3] [v5] kexec and kdump for Xen PVonHVM guests
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Tue, 16 Aug 2011 15:16:50 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 Aug 2011 06:20:34 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1313500664; l=2543; s=domk; d=aepfle.de; h=Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=RdIsZZc2zyK1Sci9tc7wkwiNXF8=; b=B0OP7+cvdzjq5Q4LCKWJ9DC2vucFZfaOEI+1WxPmM3hwdxZK2J6xYsMEaRxS1ZtUOsr +UByADDKkIvOEwN+5Hxu/Ao8LoiPjCV07FAKHdE8pohxQ8jB3iJirsvvxZP+Xbt29tH0+ qXQ7omYBjhPa04m09Xlo8ZA/n4f6Im6a1b0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The following series implements kexec and kdump in a Xen PVonHVM guest.

It is available via git:

 git://github.com/olafhering/linux.git xen-kexec-3.0

changes since v4:
- drop patch which uses XS_INTRODUCE, a different way to reset watches
  has to be found
- find_virq(): use NR_EVENT_CHANNELS instead of private MAX_EVTCHNS
- reconnect devices:
  add timeout when waiting for backend state change
  extent printk message to include backend string
  add comment to fall-through case in xenbus_reset_frontend
- new patch which prevents crash in xenwatch_thread() during repeated
  kexec boots


The kexec or kdump kernel has to take care of already allocated virqs,
PV devices in Closed or Connected state, and of registered watches in
the old kernel. With the three patches these conditions are checked
during boot of the new kernel rather than in the reboot/crash path.

A fixed kexec-tools-2.0.2 package is required:
http://lists.infradead.org/pipermail/kexec/2011-May/005026.html
http://lists.infradead.org/pipermail/kexec/2011-August/005339.html

Another fix is for xenstored, it has to accept the XS_RESET_WATCHES from
a guest. Since the exact interface to xenstored is not yet final, the
patch to deal with the reset was removed from this series.
http://lists.xensource.com/archives/html/xen-devel/2011-08/msg00529.html
http://lists.xensource.com/archives/html/xen-devel/2011-08/msg00533.html

One open issue is the balloon driver. It removes pages from the guest
and gives them back to the hypervisor. The kexec kernel is not aware of
the fact that some pages are unavailable, and hangs or crashes.
The workaround for the time being is:

if test -f /sys/devices/system/xen_memory/xen_memory0/target -a \
        -f /sys/devices/system/xen_memory/xen_memory0/target_kb
then
    cat /sys/devices/system/xen_memory/xen_memory0/target > \
        /sys/devices/system/xen_memory/xen_memory0/target_kb
fi
kexec -e

This balloon issue has to be resolved with another series of changes.

Olaf

Olaf Hering (3):
  xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale
    watch events arrive
  xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
  xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel

 drivers/xen/events.c                       |   37 +++++++-
 drivers/xen/xenbus/xenbus_comms.c          |    4 +-
 drivers/xen/xenbus/xenbus_probe_frontend.c |  121 ++++++++++++++++++++++++++++
 drivers/xen/xenbus/xenbus_xs.c             |    2 +-
 4 files changed, 157 insertions(+), 7 deletions(-)

-- 
1.7.3.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel