From: Jan Kiszka <jan.kis...@siemens.com>

It does currently fit into one page, but there is no reason to hard-code
this.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 hypervisor/ivshmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/ivshmem.c b/hypervisor/ivshmem.c
index ded50a20..b6f60d25 100644
--- a/hypervisor/ivshmem.c
+++ b/hypervisor/ivshmem.c
@@ -355,7 +355,7 @@ int ivshmem_init(struct cell *cell, struct pci_device 
*device)
                       "\"%s\" <--> \"%s\"\n",
                       cell->config->name, peer_dev->cell->config->name);
        } else {
-               link = page_alloc(&mem_pool, 1);
+               link = page_alloc(&mem_pool, PAGES(sizeof(*link)));
                if (!link)
                        return -ENOMEM;
 
-- 
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/37226ed0867dcc416dab440370814d543a632a27.1578313099.git.jan.kiszka%40siemens.com.

Reply via email to