diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-05-19 18:35:44 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-06-19 04:40:05 +0200 |
commit | 6506e4f995967b1a48cc34418c77b318df92ce35 (patch) | |
tree | 6ffb6a8338385ba80ace131fbd08a872d3ae6820 /xen-mapcache.c | |
parent | cd306087e5a9ea4091071a0a41c0ea99fac60ab0 (diff) |
xen: remove xen_map_block and xen_unmap_block
Replace xen_map_block with qemu_map_cache with the appropriate locking
and size parameters.
Replace xen_unmap_block with qemu_invalidate_entry.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'xen-mapcache.c')
-rw-r--r-- | xen-mapcache.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/xen-mapcache.c b/xen-mapcache.c index 57fe24de8..fac47cd9b 100644 --- a/xen-mapcache.c +++ b/xen-mapcache.c @@ -362,34 +362,3 @@ void qemu_invalidate_map_cache(void) mapcache_unlock(); } - -uint8_t *xen_map_block(target_phys_addr_t phys_addr, target_phys_addr_t size) -{ - uint8_t *vaddr_base; - xen_pfn_t *pfns; - int *err; - unsigned int i; - target_phys_addr_t nb_pfn = size >> XC_PAGE_SHIFT; - - trace_xen_map_block(phys_addr, size); - phys_addr >>= XC_PAGE_SHIFT; - - pfns = qemu_mallocz(nb_pfn * sizeof (xen_pfn_t)); - err = qemu_mallocz(nb_pfn * sizeof (int)); - - for (i = 0; i < nb_pfn; i++) { - pfns[i] = phys_addr + i; - } - - vaddr_base = xc_map_foreign_bulk(xen_xc, xen_domid, PROT_READ|PROT_WRITE, - pfns, err, nb_pfn); - if (vaddr_base == NULL) { - perror("xc_map_foreign_bulk"); - exit(-1); - } - - qemu_free(pfns); - qemu_free(err); - - return vaddr_base; -} |