From patchwork Wed Sep 5 08:32:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1406641 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 655A93FC71 for ; Wed, 5 Sep 2012 08:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758195Ab2IEIgb (ORCPT ); Wed, 5 Sep 2012 04:36:31 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:40454 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758177Ab2IEIg3 (ORCPT ); Wed, 5 Sep 2012 04:36:29 -0400 Received: by mail-we0-f174.google.com with SMTP id x8so223930wey.19 for ; Wed, 05 Sep 2012 01:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=HwxOf0NdwvRCmcHTbEDhFbBhuij0602pZmXLLc5jqKE=; b=Q8whyJ4kwBp0KNKK34DPVZkno8yGPQZR+fjYyLqhqTHh0IKi0cFhR7vVubfJhj0nrl 4mI5+hz7TYxJVwKjMaiT2SBuLN9A9+WQUCZ0s9IDxBV3AJJNmUGCThtYWjyLrJcJfJzx UxzN9GS57npnRMAy7M072RG6oN02xBO9y10RNGORgW9pxCTidEKk6MvfLNGGVnMm+nn/ dHv3jBL2JRYoTnY1VV/Dh0fUtaP338T/7TdxghzyGpMW05eQKk6SXRMmTwJSDNf3vFbj ZpxEHC7CZqUIHgc/DXZ8GuJgEgvJzlQUrmXl+BuK4oWVYO3W+TRdZmKgHLzLle0XtI1V 9hyA== Received: by 10.180.97.33 with SMTP id dx1mr36377009wib.18.1346834188444; Wed, 05 Sep 2012 01:36:28 -0700 (PDT) Received: from lappy.capriciverd.com (20.Red-80-59-140.staticIP.rima-tde.net. [80.59.140.20]) by mx.google.com with ESMTPS id q4sm27971068wix.9.2012.09.05.01.36.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:36:27 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: asias.hejun@gmail.com, mingo@elte.hu, gorcunov@openvz.org, kvm@vger.kernel.org, Sasha Levin Subject: [PATCH 27/33] kvm tools: ram init Date: Wed, 5 Sep 2012 10:32:01 +0200 Message-Id: <1346833927-15740-28-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> References: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org RAM should be initialized as part of kvm__init, and not somewhere random in the global init code. Signed-off-by: Sasha Levin --- tools/kvm/builtin-run.c | 2 -- tools/kvm/kvm.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index 66bba44..f54a6c1 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -800,8 +800,6 @@ static int kvm_cmd_run_init(int argc, const char **argv) goto fail; } - kvm__init_ram(kvm); - r = kbd__init(kvm); if (r < 0) { pr_err("kbd__init() failed with error %d\n", r); diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 7a6e15e..cca2e93 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -246,6 +246,8 @@ int kvm__init(struct kvm *kvm) kvm__arch_init(kvm, kvm->cfg.hugetlbfs_path, kvm->cfg.ram_size); + kvm__init_ram(kvm); + if (!kvm->cfg.firmware_filename) { if (!kvm__load_kernel(kvm, kvm->cfg.kernel_filename, kvm->cfg.initrd_filename, kvm->cfg.real_cmdline, kvm->cfg.vidmode))