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>
This commit is contained in:
Stefano Stabellini 2011-05-19 18:35:44 +01:00 committed by Alexander Graf
parent cd306087e5
commit 6506e4f995
4 changed files with 4 additions and 65 deletions

View file

@ -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;
}