root / hw / virtio-pci.h @ 814cd3ac
History | View | Annotate | Download (1.4 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 | 973abc7f | Stefan Hajnoczi | #include "virtio-scsi.h" |
21 | 9fe1ebeb | Aneesh Kumar K.V | |
22 | 5745e38a | Aneesh Kumar K.V | /* Performance improves when virtqueue kick processing is decoupled from the
|
23 | 5745e38a | Aneesh Kumar K.V | * vcpu thread using ioeventfd for some devices. */
|
24 | 5745e38a | Aneesh Kumar K.V | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1 |
25 | 5745e38a | Aneesh Kumar K.V | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT) |
26 | 5745e38a | Aneesh Kumar K.V | |
27 | 9fe1ebeb | Aneesh Kumar K.V | typedef struct { |
28 | 9fe1ebeb | Aneesh Kumar K.V | PCIDevice pci_dev; |
29 | 9fe1ebeb | Aneesh Kumar K.V | VirtIODevice *vdev; |
30 | da146d0a | Avi Kivity | MemoryRegion bar; |
31 | 95524ae8 | Avi Kivity | MemoryRegion msix_bar; |
32 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t flags; |
33 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t class_code; |
34 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t nvectors; |
35 | 9fe1ebeb | Aneesh Kumar K.V | BlockConf block; |
36 | a8686a9b | Markus Armbruster | char *block_serial;
|
37 | 9fe1ebeb | Aneesh Kumar K.V | NICConf nic; |
38 | 9fe1ebeb | Aneesh Kumar K.V | uint32_t host_features; |
39 | 9fe1ebeb | Aneesh Kumar K.V | #ifdef CONFIG_LINUX
|
40 | 9fe1ebeb | Aneesh Kumar K.V | V9fsConf fsconf; |
41 | 9fe1ebeb | Aneesh Kumar K.V | #endif
|
42 | 9fe1ebeb | Aneesh Kumar K.V | virtio_serial_conf serial; |
43 | 9fe1ebeb | Aneesh Kumar K.V | virtio_net_conf net; |
44 | 973abc7f | Stefan Hajnoczi | VirtIOSCSIConf scsi; |
45 | 9fe1ebeb | Aneesh Kumar K.V | bool ioeventfd_disabled;
|
46 | 9fe1ebeb | Aneesh Kumar K.V | bool ioeventfd_started;
|
47 | 9fe1ebeb | Aneesh Kumar K.V | } VirtIOPCIProxy; |
48 | 9fe1ebeb | Aneesh Kumar K.V | |
49 | befeac45 | Michael S. Tsirkin | void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
|
50 | 8798d6c9 | Aneesh Kumar K.V | void virtio_pci_reset(DeviceState *d);
|
51 | befeac45 | Michael S. Tsirkin | |
52 | befeac45 | Michael S. Tsirkin | /* Virtio ABI version, if we increment this, we break the guest driver. */
|
53 | befeac45 | Michael S. Tsirkin | #define VIRTIO_PCI_ABI_VERSION 0 |
54 | befeac45 | Michael S. Tsirkin | |
55 | 9fe1ebeb | Aneesh Kumar K.V | #endif |