From: Sasha Levin Date: Wed, 5 Sep 2012 08:32:01 +0000 (+0200) Subject: kvm tools: ram init X-Git-Tag: next-20120910~8^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cb73c5c954a1f669a29f491359bf88634e50768b;p=karo-tx-linux.git kvm tools: ram init RAM should be initialized as part of kvm__init, and not somewhere random in the global init code. Signed-off-by: Sasha Levin Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index 44adf71b60ee..ecc80be42abb 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 7a6e15e58b9d..cca2e9361646 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))