From patchwork Wed Dec 17 15:40:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 5507481 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 008D5BEEBA for ; Wed, 17 Dec 2014 15:40:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36E5A20A24 for ; Wed, 17 Dec 2014 15:40:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4335B20A25 for ; Wed, 17 Dec 2014 15:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751033AbaLQPkp (ORCPT ); Wed, 17 Dec 2014 10:40:45 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:50531 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946AbaLQPko (ORCPT ); Wed, 17 Dec 2014 10:40:44 -0500 Received: from e106785-lin.cambridge.arm.com ([10.1.203.45]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id sBHFebwt003928; Wed, 17 Dec 2014 15:40:38 GMT From: Andre Przywara To: will.deacon@arm.com, penberg@kernel.org Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v3 5/5] kvmtool: remove warning about bzImage on non-x86 architectures Date: Wed, 17 Dec 2014 15:40:48 +0000 Message-Id: <1418830848-1463-6-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1418830848-1463-1-git-send-email-andre.przywara@arm.com> References: <1418830848-1463-1-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index e1b9f6c..05064b6 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -380,12 +380,14 @@ 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); +#endif ret = load_elf_binary(kvm, fd_kernel, fd_initrd, kernel_cmdline);