]> git.proxmox.com Git - qemu.git/blame - hw/virtio-pci.h
target-i386: Introduce x86_cpuid_version_set_model()
[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
18#include "virtio-net.h"
19#include "virtio-serial.h"
20
5745e38a
AK
21/* Performance improves when virtqueue kick processing is decoupled from the
22 * vcpu thread using ioeventfd for some devices. */
23#define VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT 1
24#define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
25
9fe1ebeb
AK
26typedef struct {
27 PCIDevice pci_dev;
28 VirtIODevice *vdev;
da146d0a 29 MemoryRegion bar;
95524ae8 30 MemoryRegion msix_bar;
9fe1ebeb 31 uint32_t flags;
9fe1ebeb
AK
32 uint32_t class_code;
33 uint32_t nvectors;
34 BlockConf block;
a8686a9b 35 char *block_serial;
9fe1ebeb
AK
36 NICConf nic;
37 uint32_t host_features;
38#ifdef CONFIG_LINUX
39 V9fsConf fsconf;
40#endif
41 virtio_serial_conf serial;
42 virtio_net_conf net;
43 bool ioeventfd_disabled;
44 bool ioeventfd_started;
45} VirtIOPCIProxy;
46
befeac45 47void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
8798d6c9 48void virtio_pci_reset(DeviceState *d);
befeac45
MT
49
50/* Virtio ABI version, if we increment this, we break the guest driver. */
51#define VIRTIO_PCI_ABI_VERSION 0
52
9fe1ebeb 53#endif