]> git.proxmox.com Git - mirror_qemu.git/blame - hw/virtio-pci.h
dataplane: fix build breakage on set_guest_notifiers()
[mirror_qemu.git] / hw / virtio-pci.h
CommitLineData
9fe1ebeb
AK
1/*
2 * Virtio PCI Bindings
3 *
4 * Copyright IBM, Corp. 2007
5 * Copyright (c) 2009 CodeSourcery
6 *
7 * Authors:
8 * Anthony Liguori <aliguori@us.ibm.com>
9 * Paul Brook <paul@codesourcery.com>
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
12c5674b 18#include "virtio-blk.h"
9fe1ebeb 19#include "virtio-net.h"
16c915ba 20#include "virtio-rng.h"
9fe1ebeb 21#include "virtio-serial.h"
973abc7f 22#include "virtio-scsi.h"
9fe1ebeb 23
5745e38a
AK
24/* Performance improves when virtqueue kick processing is decoupled from the
25 * vcpu thread using ioeventfd for some devices. */
26#define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1
27#define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
28
7d37d351 29typedef struct {
774345f9 30 MSIMessage msg;
7d37d351
JK
31 int virq;
32 unsigned int users;
33} VirtIOIRQFD;
34
9fe1ebeb
AK
35typedef struct {
36 PCIDevice pci_dev;
37 VirtIODevice *vdev;
da146d0a 38 MemoryRegion bar;
9fe1ebeb 39 uint32_t flags;
9fe1ebeb
AK
40 uint32_t class_code;
41 uint32_t nvectors;
12c5674b 42 VirtIOBlkConf blk;
9fe1ebeb
AK
43 NICConf nic;
44 uint32_t host_features;
45#ifdef CONFIG_LINUX
46 V9fsConf fsconf;
47#endif
48 virtio_serial_conf serial;
49 virtio_net_conf net;
973abc7f 50 VirtIOSCSIConf scsi;
16c915ba 51 VirtIORNGConf rng;
9fe1ebeb
AK
52 bool ioeventfd_disabled;
53 bool ioeventfd_started;
7d37d351 54 VirtIOIRQFD *vector_irqfd;
2d620f59 55 int nvqs_with_notifiers;
9fe1ebeb
AK
56} VirtIOPCIProxy;
57
befeac45 58void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
8798d6c9 59void virtio_pci_reset(DeviceState *d);
befeac45
MT
60
61/* Virtio ABI version, if we increment this, we break the guest driver. */
62#define VIRTIO_PCI_ABI_VERSION 0
63
9fe1ebeb 64#endif