]>
Commit | Line | Data |
---|---|---|
9fe1ebeb AK |
1 | /* |
2 | * Virtio PCI Bindings | |
3 | * | |
4 | * Copyright IBM, Corp. 2007 | |
5 | * Copyright (c) 2009 CodeSourcery | |
6 | * | |
7 | * Authors: | |
8 | * Anthony Liguori <[email protected]> | |
9 | * Paul Brook <[email protected]> | |
10 | * | |
11 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
12 | * the COPYING file in the top-level directory. | |
13 | */ | |
14 | ||
15 | #ifndef QEMU_VIRTIO_PCI_H | |
16 | #define QEMU_VIRTIO_PCI_H | |
17 | ||
18 | #include "virtio-net.h" | |
19 | #include "virtio-serial.h" | |
973abc7f | 20 | #include "virtio-scsi.h" |
9fe1ebeb | 21 | |
5745e38a AK |
22 | /* Performance improves when virtqueue kick processing is decoupled from the |
23 | * vcpu thread using ioeventfd for some devices. */ | |
24 | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1 | |
25 | #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT) | |
26 | ||
9fe1ebeb AK |
27 | typedef struct { |
28 | PCIDevice pci_dev; | |
29 | VirtIODevice *vdev; | |
da146d0a | 30 | MemoryRegion bar; |
95524ae8 | 31 | MemoryRegion msix_bar; |
9fe1ebeb | 32 | uint32_t flags; |
9fe1ebeb AK |
33 | uint32_t class_code; |
34 | uint32_t nvectors; | |
35 | BlockConf block; | |
a8686a9b | 36 | char *block_serial; |
9fe1ebeb AK |
37 | NICConf nic; |
38 | uint32_t host_features; | |
39 | #ifdef CONFIG_LINUX | |
40 | V9fsConf fsconf; | |
41 | #endif | |
42 | virtio_serial_conf serial; | |
43 | virtio_net_conf net; | |
973abc7f | 44 | VirtIOSCSIConf scsi; |
9fe1ebeb AK |
45 | bool ioeventfd_disabled; |
46 | bool ioeventfd_started; | |
47 | } VirtIOPCIProxy; | |
48 | ||
befeac45 | 49 | void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev); |
8798d6c9 | 50 | void virtio_pci_reset(DeviceState *d); |
befeac45 MT |
51 | |
52 | /* Virtio ABI version, if we increment this, we break the guest driver. */ | |
53 | #define VIRTIO_PCI_ABI_VERSION 0 | |
54 | ||
9fe1ebeb | 55 | #endif |