diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-06-30 00:10:16 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-10-26 10:19:53 +0100 |
commit | d9453c93fea0c9c67f9c63bfa79a87631317d746 (patch) | |
tree | 6dccddca15ec4d8416471f2378a4cd2f1e28c1d2 /tests/ivshmem-test.c | |
parent | 2c04752cc8e37b15be4643570b49abb3128a8a46 (diff) | |
download | qemu-d9453c93fea0c9c67f9c63bfa79a87631317d746.zip qemu-d9453c93fea0c9c67f9c63bfa79a87631317d746.tar.gz qemu-d9453c93fea0c9c67f9c63bfa79a87631317d746.tar.bz2 |
ivshmem: add hostmem backend
Instead of handling allocation, teach ivshmem to use a memory backend.
This allows to use hugetlbfs backed memory now.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Diffstat (limited to 'tests/ivshmem-test.c')
-rw-r--r-- | tests/ivshmem-test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c index 71e5905..c8f0cf0 100644 --- a/tests/ivshmem-test.c +++ b/tests/ivshmem-test.c @@ -386,6 +386,17 @@ static void test_ivshmem_hotplug(void) g_free(opts); } +static void test_ivshmem_memdev(void) +{ + IVState state; + + /* just for the sake of checking memory-backend property */ + setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1" + " -device ivshmem,memdev=mb1", false); + + qtest_quit(state.qtest); +} + static void cleanup(void) { if (tmpshmem) { @@ -470,6 +481,7 @@ int main(int argc, char **argv) qtest_add_func("/ivshmem/pair", test_ivshmem_pair); qtest_add_func("/ivshmem/server", test_ivshmem_server); qtest_add_func("/ivshmem/hotplug", test_ivshmem_hotplug); + qtest_add_func("/ivshmem/memdev", test_ivshmem_memdev); ret = g_test_run(); |