From cb73c5c954a1f669a29f491359bf88634e50768b Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 5 Sep 2012 10:32:01 +0200 Subject: [PATCH] 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 --- 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 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)) -- 2.39.5