From: Daniel Kiper Subject: Re: [PATCH 4/4] kexec/xen: directly load images images into Xen Date: Mon, 7 Oct 2013 09:22:33 +0200 Message-ID: <20131007072233.GL3626@debian70-amd64.local.net-space.pl> References: <1379682998-14279-1-git-send-email-david.vrabel@citrix.com> <1379682998-14279-5-git-send-email-david.vrabel@citrix.com> <20131004213341.GI3626@debian70-amd64.local.net-space.pl> <525179FE.9030202@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <525179FE.9030202@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: kexec@list.infradead.org, Simon Horman , David Vrabel , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sun, Oct 06, 2013 at 03:55:58PM +0100, Andrew Cooper wrote: > On 04/10/2013 22:33, Daniel Kiper wrote: > > > > + xch = xc_interface_open(NULL, NULL, 0); > > + if (!xch) > > + return -1; > > + > > + type = kexec_flags & KEXEC_TYPE_CRASH; > > Why? Could not we unload normal kexec images? > > type is 0 for normal images and 1 for crash images. This line does not > prevent unloading of normal images in the slightest. My fault. It is & not |. But it should be like in xen_kexec_load(): type = (kexec_flags & KEXEC_ON_CRASH) ? KEXEC_TYPE_CRASH : KEXEC_TYPE_DEFAULT; or even type = kexec_flags & ~KEXEC_ARCH_MASK; Daniel