]> git.proxmox.com Git - mirror_qemu.git/blame - include/qemu/vfio-helpers.h
util/uri: Remove uri_string_unescape()
[mirror_qemu.git] / include / qemu / vfio-helpers.h
CommitLineData
418026ca
FZ
1/*
2 * QEMU VFIO helpers
3 *
4 * Copyright 2016 - 2018 Red Hat, Inc.
5 *
6 * Authors:
7 * Fam Zheng <famz@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
13#ifndef QEMU_VFIO_HELPERS_H
14#define QEMU_VFIO_HELPERS_H
418026ca
FZ
15
16typedef struct QEMUVFIOState QEMUVFIOState;
17
18QEMUVFIOState *qemu_vfio_open_pci(const char *device, Error **errp);
19void qemu_vfio_close(QEMUVFIOState *s);
20int qemu_vfio_dma_map(QEMUVFIOState *s, void *host, size_t size,
521b97cd 21 bool temporary, uint64_t *iova_list, Error **errp);
418026ca
FZ
22int qemu_vfio_dma_reset_temporary(QEMUVFIOState *s);
23void qemu_vfio_dma_unmap(QEMUVFIOState *s, void *host);
24void *qemu_vfio_pci_map_bar(QEMUVFIOState *s, int index,
b02c01a5 25 uint64_t offset, uint64_t size, int prot,
418026ca
FZ
26 Error **errp);
27void qemu_vfio_pci_unmap_bar(QEMUVFIOState *s, int index, void *bar,
28 uint64_t offset, uint64_t size);
29int qemu_vfio_pci_init_irq(QEMUVFIOState *s, EventNotifier *e,
30 int irq_type, Error **errp);
31
32#endif