mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
2c04752cc8
commit
d9453c93fe
2 changed files with 78 additions and 18 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue