From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2 5/5] kvmtool: remove warning about bzImage on non-x86 architectures Date: Wed, 17 Dec 2014 11:43:36 +0000 Message-ID: <20141217114335.GE3461@arm.com> References: <1418814887-3523-1-git-send-email-andre.przywara@arm.com> <1418814887-3523-6-git-send-email-andre.przywara@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "penberg@kernel.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" To: Andre Przywara Return-path: Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:51098 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbaLQLnt (ORCPT ); Wed, 17 Dec 2014 06:43:49 -0500 Content-Disposition: inline In-Reply-To: <1418814887-3523-6-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Dec 17, 2014 at 11:14:47AM +0000, Andre Przywara wrote: > Among the architectures supported by kvmtool, only x86 defines a > bzImage format. So we shouldn't bother users of other architectures > with a message about something that cannot work. > Make the bzImage check dependent on compiling for x86. > > Signed-off-by: Andre Przywara > --- > tools/kvm/kvm.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c > index e1b9f6c..21817c3 100644 > --- a/tools/kvm/kvm.c > +++ b/tools/kvm/kvm.c > @@ -380,12 +380,15 @@ bool kvm__load_kernel(struct kvm *kvm, const char *kernel_filename, > die("%s is not an initrd", initrd_filename); > } > > +#ifdef CONFIG_X86 > ret = load_bzimage(kvm, fd_kernel, fd_initrd, kernel_cmdline); > > if (ret) > goto found_kernel; > > - pr_warning("%s is not a bzImage. Trying to load it as a flat binary...", kernel_filename); > + pr_warning("%s is not a bzImage. Trying to load it as an ELF or flat binary...", > + kernel_filename); > +#endif I don't think you need to change the string (at least, that seems to be an unrelated change). Will