]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: ram init
authorSasha Levin <levinsasha928@gmail.com>
Wed, 5 Sep 2012 08:32:01 +0000 (10:32 +0200)
committerPekka Enberg <penberg@kernel.org>
Wed, 5 Sep 2012 13:22:38 +0000 (16:22 +0300)
RAM should be initialized as part of kvm__init, and not somewhere random in the global
init code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-run.c
tools/kvm/kvm.c

index 44adf71b60eed7c1ace24fc203bb065629010f10..ecc80be42abb2227734175465e6195c3810fca91 100644 (file)
@@ -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);
index 7a6e15e58b9d27d2a2d1dfbd0cd5f7a4b41f92a1..cca2e9361646ba23207362eedf2929b600442d52 100644 (file)
@@ -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))