diff mbox

[27/33] kvm tools: ram init

Message ID 1346833927-15740-28-git-send-email-levinsasha928@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sasha Levin Sept. 5, 2012, 8:32 a.m. UTC
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>
---
 tools/kvm/builtin-run.c | 2 --
 tools/kvm/kvm.c         | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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))