From: Will Deacon Subject: [PATCH 02/17] kvm tools: pci: remove BAR 3 hangover from virtio pci msix code Date: Tue, 4 Feb 2014 16:53:17 +0000 Message-ID: <1391532812-2043-3-git-send-email-will.deacon@arm.com> References: <1391532812-2043-1-git-send-email-will.deacon@arm.com> Cc: kvmarm@lists.cs.columbia.edu, penberg@kernel.org, marc.zyngier@arm.com, arnd@arndb.de To: kvm@vger.kernel.org Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:49538 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbaBDQxs (ORCPT ); Tue, 4 Feb 2014 11:53:48 -0500 In-Reply-To: <1391532812-2043-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 Signed-off-by: Will Deacon --- tools/kvm/virtio/pci.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c index 91010cabbcde..77c933fd4ab2 100644 --- a/tools/kvm/virtio/pci.c +++ b/tools/kvm/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); -- 1.8.2.2