summaryrefslogtreecommitdiffstats
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
authorMarcel Apfelbaum2017-02-20 21:43:12 +0100
committerMichael S. Tsirkin2017-03-16 00:46:41 +0100
commitd584f1b9ca7452ed8d6cd80f7fccd79d667ae49b (patch)
tree7bff296599edb06fae38918ee3bfaac35ed51b10 /hw/virtio/virtio-pci.h
parenthw/virtio: fix error enabling flags in Device Control register (diff)
downloadqemu-d584f1b9ca7452ed8d6cd80f7fccd79d667ae49b.tar.gz
qemu-d584f1b9ca7452ed8d6cd80f7fccd79d667ae49b.tar.xz
qemu-d584f1b9ca7452ed8d6cd80f7fccd79d667ae49b.zip
hw/virtio: fix Link Control Register for PCI Express virtio devices
Make several Link Control Register flags writable to conform with the PCI Express spec. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r--hw/virtio/virtio-pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 120661db5a..9b5dd5a752 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -74,6 +74,7 @@ enum {
VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT,
VIRTIO_PCI_FLAG_ATS_BIT,
VIRTIO_PCI_FLAG_INIT_DEVERR_BIT,
+ VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT,
};
/* Need to activate work-arounds for buggy guests at vmstate load. */
@@ -104,6 +105,9 @@ enum {
/* Init error enabling flags */
#define VIRTIO_PCI_FLAG_INIT_DEVERR (1 << VIRTIO_PCI_FLAG_INIT_DEVERR_BIT)
+/* Init Link Control register */
+#define VIRTIO_PCI_FLAG_INIT_LNKCTL (1 << VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT)
+
typedef struct {
MSIMessage msg;
int virq;