From patchwork Wed Dec 17 11:14:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 5506701 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BBE39F456 for ; Wed, 17 Dec 2014 11:14:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B584520A28 for ; Wed, 17 Dec 2014 11:14:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCBB320A27 for ; Wed, 17 Dec 2014 11:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751760AbaLQLOq (ORCPT ); Wed, 17 Dec 2014 06:14:46 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:45509 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbaLQLOo (ORCPT ); Wed, 17 Dec 2014 06:14: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 sBHBEawt026488; Wed, 17 Dec 2014 11:14:37 GMT From: Andre Przywara To: will.deacon@arm.com, penberg@kernel.org Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v2 5/5] kvmtool: remove warning about bzImage on non-x86 architectures Date: Wed, 17 Dec 2014 11:14:47 +0000 Message-Id: <1418814887-3523-6-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1418814887-3523-1-git-send-email-andre.przywara@arm.com> References: <1418814887-3523-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 | 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 ret = load_elf_binary(kvm, fd_kernel, fd_initrd, kernel_cmdline);