virtio-pci.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifndef QEMU_VIRTIO_PCI_H
  15. #define QEMU_VIRTIO_PCI_H
  16. #include "virtio-net.h"
  17. #include "virtio-serial.h"
  18. typedef struct {
  19. PCIDevice pci_dev;
  20. VirtIODevice *vdev;
  21. uint32_t flags;
  22. uint32_t addr;
  23. uint32_t class_code;
  24. uint32_t nvectors;
  25. BlockConf block;
  26. char *block_serial;
  27. NICConf nic;
  28. uint32_t host_features;
  29. #ifdef CONFIG_LINUX
  30. V9fsConf fsconf;
  31. #endif
  32. virtio_serial_conf serial;
  33. virtio_net_conf net;
  34. bool ioeventfd_disabled;
  35. bool ioeventfd_started;
  36. } VirtIOPCIProxy;
  37. void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
  38. /* Virtio ABI version, if we increment this, we break the guest driver. */
  39. #define VIRTIO_PCI_ABI_VERSION 0
  40. #endif