[PATCH 27/33] kvm tools: ram init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RAM should be initialized as part of kvm__init, and not somewhere random in the global
init code.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 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))
-- 
1.7.12

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux