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

Re: [Xen-devel] [PATCH] xen/pv-on-hvm kexec: add xs_reset_watches to shu

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 15 Aug 2011 14:59:58 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 15 Aug 2011 06:03:57 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1313413233; l=1693; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=uQX02dR/mNLGZ+lMjoza1oFMRb4=; b=oHDG/A/egs+F65+PV9AXRTb6iFvbavOa0hI55dLi7eXjwXljiooFCSFLpLOsbBZwvNC WqvGu0AQ1M9ZT0MBQ9gHvqX32d2CMEV58woRV9ogtPXEP9EbFY/Ht+hiV0VPvb8WEoelL UMe013xZwLwq7DJM1+mcjkNi5ThsIFf1+Dg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110815125306.GA11127@xxxxxxxxxxxx>
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>
References: <4b483f4fa715566847b5.1313397256@xxxxxxxxxxxx> <20110815092530.GA3001@xxxxxxxxx> <20110815125306.GA11127@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
On Mon, Aug 15, Konrad Rzeszutek Wilk wrote:

> On Mon, Aug 15, 2011 at 11:25:30AM +0200, Olaf Hering wrote:
> > Add new xs_reset_watches function to shutdown watches from old kernel after
> > kexec boot.  The old kernel does not unregister all watches in the
> > shutdown path.  They are still active, the double registration can not
> > be detected by the new kernel.  When the watches fire, unexpected events
> > will arrive and the xenwatch thread will crash (jumps to NULL).  An
> > orderly reboot of a hvm guest will destroy the entire guest with all its
> > resources (including the watches) before it is rebuilt from scratch, so
> > the missing unregister is not an issue in that case.
> 
> So this patch replaces the big patch series you sent some while ago?
> [I've one of your patches in my tree, but I wasn't sure about the other
> ones]

No, there are 3 other patches required:

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

I will send them once we settled on a way to reset the watches.

Which one did you already apply?

> If the xenstore does not have the patch for this, what is the
> error code? Is it ENOSYS? If we get that can we not print this message?
> Or perhaps print:
> "Yikes! We can't reset the watches. Potential crash immienient"
> or something similar.

Now that you mention it, the return code should be checked and ENOSYS
should be filtered to not print the warning on a host without the
updated xenstored.  I will update that part of the patch.

Olaf

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