diff options
author | Will Deacon <will.deacon@arm.com> | 2014-02-04 16:53:50 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-01 16:39:54 +0100 |
commit | 385ebc4f3bc599b585daac05ef84327d33626264 (patch) | |
tree | 9cd2b0976c4d6f86c19208d844cbf7d35b214f29 | |
parent | 111b310992cf846cbd98485a8326672d6c09ecd9 (diff) | |
download | kvmtool-385ebc4f3bc599b585daac05ef84327d33626264.tar.gz |
kvm tools: pci: remove BAR 3 hangover from virtio pci msix code
Despite not being used anymore, there are still traces of BAR 3 in both
the code and comments for the virtio pci msix implementation.
This patch removes the redundant code and fixes up the comments to match
what we're actually doing.
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | virtio/pci.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/virtio/pci.c b/virtio/pci.c index 91010cab..77c933fd 100644 --- a/virtio/pci.c +++ b/virtio/pci.c @@ -345,7 +345,6 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev, .capabilities = (void *)&vpci->pci_hdr.msix - (void *)&vpci->pci_hdr, .bar_size[0] = IOPORT_SIZE, .bar_size[1] = PCI_IO_SIZE * 2, - .bar_size[3] = PCI_IO_SIZE, }; vpci->dev_hdr = (struct device_header) { @@ -368,12 +367,9 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev, */ vpci->pci_hdr.msix.ctrl = cpu_to_le16(VIRTIO_PCI_MAX_VQ + VIRTIO_PCI_MAX_CONFIG - 1); - /* - * Both table and PBA could be mapped on the same BAR, but for now - * we're not in short of BARs - */ - vpci->pci_hdr.msix.table_offset = cpu_to_le32(1); /* Use BAR 1 */ - vpci->pci_hdr.msix.pba_offset = cpu_to_le32(1 | PCI_IO_SIZE); /* Use BAR 3 */ + /* Both table and PBA are mapped to the same BAR (1) */ + vpci->pci_hdr.msix.table_offset = cpu_to_le32(1); + vpci->pci_hdr.msix.pba_offset = cpu_to_le32(1 | PCI_IO_SIZE); vpci->config_vector = 0; r = irq__register_device(subsys_id, &pin, &line); |