summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 20:25:08 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-04 00:28:47 -0300
commitc902760fb25f9c490af01e8f6bccaa8dd71cc224 (patch)
treeebf40c2fba4b138eee6721d011f9f82040a6e565 /vl.c
parent60e4c6317b8773d987729401aeca9d8c6b61b05f (diff)
downloadqemu-c902760fb25f9c490af01e8f6bccaa8dd71cc224.tar.gz
qemu-c902760fb25f9c490af01e8f6bccaa8dd71cc224.tar.bz2
qemu-c902760fb25f9c490af01e8f6bccaa8dd71cc224.zip
Add option to use file backed guest memory
Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful for backing guest memory with huge pages via hugetlbfs. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> CC: john cooper <john.cooper@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index db7a178f88..274d847294 100644
--- a/vl.c
+++ b/vl.c
@@ -185,6 +185,10 @@ enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
DisplayType display_type = DT_DEFAULT;
const char* keyboard_layout = NULL;
ram_addr_t ram_size;
+const char *mem_path = NULL;
+#ifdef MAP_POPULATE
+int mem_prealloc = 0; /* force preallocation of physical target memory */
+#endif
int nb_nics;
NICInfo nd_table[MAX_NICS];
int vm_running;
@@ -5216,6 +5220,14 @@ int main(int argc, char **argv, char **envp)
ram_size = value;
break;
}
+ case QEMU_OPTION_mempath:
+ mem_path = optarg;
+ break;
+#ifdef MAP_POPULATE
+ case QEMU_OPTION_mem_prealloc:
+ mem_prealloc = 1;
+ break;
+#endif
case QEMU_OPTION_d:
{
int mask;