From 8d31d6b65a7448582c7bd320fd1b8cfc6cca2720 Mon Sep 17 00:00:00 2001 From: Pavel Fedin Date: Wed, 28 Oct 2015 12:54:07 +0300 Subject: backends/hostmem-file: Allow to specify full pathname for backing file This allows to explicitly specify file name to use with the backend. This is important when using it together with ivshmem in order to make it backed by hugetlbfs. By default filename is autogenerated using mkstemp(), and the file is unlink()ed after creation, effectively making it anonymous. This is not very useful with ivshmem because it ends up in a memory which cannot be accessed by something else. Distinction between directory and file name is done by stat() check. If an existing directory is given, the code keeps old behavior. Otherwise it creates or opens a file with the given pathname. Signed-off-by: Pavel Fedin Tested-by: Igor Skalkin Message-Id: <004301d11166$9672fe30$c358fa90$@samsung.com> Signed-off-by: Paolo Bonzini --- qemu-doc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu-doc.texi') diff --git a/qemu-doc.texi b/qemu-doc.texi index 3126abdcd3..460ab716ac 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -1299,7 +1299,7 @@ Instead of specifying the using POSIX shm, you may specify a memory backend that has hugepage support: @example -qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages,id=mb1 +qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1 -device ivshmem,memdev=mb1 @end example -- cgit v1.2.1