root / hw / virtio-pci.h @ cde844fa
History | View | Annotate | Download (1.3 kB)
1 | 9fe1ebeb | Aneesh Kumar K.V | /*
|
---|---|---|---|
2 | 9fe1ebeb | Aneesh Kumar K.V | * Virtio PCI Bindings
|
3 | 9fe1ebeb | Aneesh Kumar K.V | *
|
4 | 9fe1ebeb | Aneesh Kumar K.V | * Copyright IBM, Corp. 2007
|
5 | 9fe1ebeb | Aneesh Kumar K.V | * Copyright (c) 2009 CodeSourcery
|
6 | 9fe1ebeb | Aneesh Kumar K.V | *
|
7 | 9fe1ebeb | Aneesh Kumar K.V | * Authors:
|
8 | 9fe1ebeb | Aneesh Kumar K.V | * Anthony Liguori <aliguori@us.ibm.com>
|
9 | 9fe1ebeb | Aneesh Kumar K.V | * Paul Brook <paul@codesourcery.com>
|
10 | 9fe1ebeb | Aneesh Kumar K.V | *
|
11 | 9fe1ebeb | Aneesh Kumar K.V | * This work is licensed under the terms of the GNU GPL, version 2. See
|
12 | 9fe1ebeb | Aneesh Kumar K.V | * the COPYING file in the top-level directory.
|
13 | 9fe1ebeb | Aneesh Kumar K.V | */
|
14 | 9fe1ebeb | Aneesh Kumar K.V | |
15 | 9fe1ebeb | Aneesh Kumar K.V | #ifndef QEMU_VIRTIO_PCI_H
|
16 | 9fe1ebeb | Aneesh Kumar K.V | #define QEMU_VIRTIO_PCI_H
|
17 | 9fe1ebeb | Aneesh Kumar K.V | |
18 | 9fe1ebeb | Aneesh Kumar K.V | #include "virtio-net.h" |
19 | 9fe1ebeb | Aneesh Kumar K.V | #include "virtio-serial.h" |
20 | 9fe1ebeb | Aneesh Kumar K.V | |
21 | 5745e38a | Aneesh Kumar K.V | /* Performance improves when virtqueue kick processing is decoupled from the
|
22 | 5745e38a | Aneesh Kumar K.V | * vcpu thread using ioeventfd for some devices. */
|
23 | 5745e38a | Aneesh Kumar K.V | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1 |
24 | 5745e38a | Aneesh Kumar K.V | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT) |
25 | 5745e38a | Aneesh Kumar K.V | |
26 | 9fe1ebeb | Aneesh Kumar K.V | typedef struct { |
27 | 9fe1ebeb | Aneesh Kumar K.V | PCIDevice pci_dev; |
28 | 9fe1ebeb | Aneesh Kumar K.V | VirtIODevice *vdev; |
29 | da146d0a | Avi Kivity | MemoryRegion bar; |
30 | 95524ae8 | Avi Kivity | MemoryRegion msix_bar; |
31 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t flags; |
32 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t class_code; |
33 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t nvectors; |
34 | 9fe1ebeb | Aneesh Kumar K.V | BlockConf block; |
35 | a8686a9b | Markus Armbruster | char *block_serial;
|
36 | 9fe1ebeb | Aneesh Kumar K.V | NICConf nic; |
37 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t host_features; |
38 | 9fe1ebeb | Aneesh Kumar K.V | #ifdef CONFIG_LINUX
|
39 | 9fe1ebeb | Aneesh Kumar K.V | V9fsConf fsconf; |
40 | 9fe1ebeb | Aneesh Kumar K.V | #endif
|
41 | 9fe1ebeb | Aneesh Kumar K.V | virtio_serial_conf serial; |
42 | 9fe1ebeb | Aneesh Kumar K.V | virtio_net_conf net; |
43 | 9fe1ebeb | Aneesh Kumar K.V | bool ioeventfd_disabled;
|
44 | 9fe1ebeb | Aneesh Kumar K.V | bool ioeventfd_started;
|
45 | 9fe1ebeb | Aneesh Kumar K.V | } VirtIOPCIProxy; |
46 | 9fe1ebeb | Aneesh Kumar K.V | |
47 | befeac45 | Michael S. Tsirkin | void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
|
48 | befeac45 | Michael S. Tsirkin | |
49 | befeac45 | Michael S. Tsirkin | /* Virtio ABI version, if we increment this, we break the guest driver. */
|
50 | befeac45 | Michael S. Tsirkin | #define VIRTIO_PCI_ABI_VERSION 0 |
51 | befeac45 | Michael S. Tsirkin | |
52 | 9fe1ebeb | Aneesh Kumar K.V | #endif |