aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-03-05 23:08:16 -0500
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:55 +0100
commitec7dd52fe3754a13ea2565fab38247081ce7be9f (patch)
tree641be81d2f58a25766989478553854aabca0c889
parentd97dadecbd7744cd7fc1cac470e09a22b0a7ebef (diff)
downloadkvmtool-ec7dd52fe3754a13ea2565fab38247081ce7be9f.tar.gz
kvm tools: mark our PCI card as PIO and MMIO able
A recent -next patch named "PCI: Ignore BAR contents when firmware left decoding disabled" has pointed out that PCI cards are supposed to declare that they have either PIO or MMIO BARs by disabling them if it didn't. Fix it by correctly marking our emulated PCI card as PIO/MMIO enabled. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--virtio/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/virtio/pci.c b/virtio/pci.c
index fa7aa002..665d492f 100644
--- a/virtio/pci.c
+++ b/virtio/pci.c
@@ -360,6 +360,7 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev,
vpci->pci_hdr = (struct pci_device_header) {
.vendor_id = cpu_to_le16(PCI_VENDOR_ID_REDHAT_QUMRANET),
.device_id = cpu_to_le16(device_id),
+ .command = PCI_COMMAND_IO | PCI_COMMAND_MEMORY,
.header_type = PCI_HEADER_TYPE_NORMAL,
.revision_id = 0,
.class[0] = class & 0xff,