]> git.proxmox.com Git - qemu.git/blame - dma.h
Add qemu_iovec_reset() (Avi Kivity)
[qemu.git] / dma.h
CommitLineData
244ab90e
AL
1/*
2 * DMA helper functions
3 *
4 * Copyright (c) 2009 Red Hat
5 *
6 * This work is licensed under the terms of the GNU General Public License
7 * (GNU GPL), version 2 or later.
8 */
9
10#ifndef DMA_H
11#define DMA_H
12
13#include <stdio.h>
14#include "cpu.h"
15
16typedef struct {
17 target_phys_addr_t base;
18 target_phys_addr_t len;
19} ScatterGatherEntry;
20
21typedef struct {
22 ScatterGatherEntry *sg;
23 int nsg;
24 int nalloc;
25 target_phys_addr_t size;
26} QEMUSGList;
27
28void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
29void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base,
30 target_phys_addr_t len);
31void qemu_sglist_destroy(QEMUSGList *qsg);
32
33#endif