From 033689ab90dc62b2dc349d37fa91708750a1ed93 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 16 Oct 2011 18:10:28 +0100 Subject: Do not map xen driver pages * xen/block.c (hyp_block_init): Use vm_page_grab_phys_addr instead of kmem_alloc_wired to allocate driver pages. * xen/net.c (hyp_net_init): Likewise. --- xen/block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xen/block.c') diff --git a/xen/block.c b/xen/block.c index 10befcc..02d410f 100644 --- a/xen/block.c +++ b/xen/block.c @@ -229,12 +229,12 @@ void hyp_block_init(void) { t = hyp_store_transaction_start(); /* Get a page for ring */ - if (kmem_alloc_wired(kernel_map, &addr, PAGE_SIZE) != KERN_SUCCESS) + if ((addr = vm_page_grab_phys_addr()) == -1) panic("%s: couldn't allocate space for store ring\n", device_name); - ring = (void*) addr; + ring = (void*) phystokv(addr); SHARED_RING_INIT(ring); FRONT_RING_INIT(&bd->ring, ring, PAGE_SIZE); - grant = hyp_grant_give(domid, atop(kvtophys(addr)), 0); + grant = hyp_grant_give(domid, atop(addr), 0); /* and give it to backend. */ i = sprintf(port_name, "%u", grant); -- cgit v1.2.3