~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to dma.h

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#include "block.h"
 
16
 
 
17
typedef struct {
 
18
    target_phys_addr_t base;
 
19
    target_phys_addr_t len;
 
20
} ScatterGatherEntry;
 
21
 
 
22
typedef struct {
 
23
    ScatterGatherEntry *sg;
 
24
    int nsg;
 
25
    int nalloc;
 
26
    target_phys_addr_t size;
 
27
} QEMUSGList;
 
28
 
 
29
void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
 
30
void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base,
 
31
                     target_phys_addr_t len);
 
32
void qemu_sglist_destroy(QEMUSGList *qsg);
 
33
 
 
34
BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,
 
35
                                QEMUSGList *sg, uint64_t sector,
 
36
                                BlockDriverCompletionFunc *cb, void *opaque);
 
37
BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,
 
38
                                 QEMUSGList *sg, uint64_t sector,
 
39
                                 BlockDriverCompletionFunc *cb, void *opaque);
 
40
 
 
41
#endif