From patchwork Tue Feb 4 16:53:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 3578201 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 50973C02DC for ; Tue, 4 Feb 2014 16:56:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81DAE20158 for ; Tue, 4 Feb 2014 16:56:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4FB520181 for ; Tue, 4 Feb 2014 16:56:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932353AbaBDQ4N (ORCPT ); Tue, 4 Feb 2014 11:56:13 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:49699 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbaBDQzu (ORCPT ); Tue, 4 Feb 2014 11:55:50 -0500 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.203.36]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s14Gs9ki003404; Tue, 4 Feb 2014 16:54:09 GMT Received: by mudshark.cambridge.arm.com (Postfix, from userid 1000) id 53655C2B16; Tue, 4 Feb 2014 16:54:08 +0000 (GMT) From: Will Deacon To: kvm@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu, penberg@kernel.org, marc.zyngier@arm.com, arnd@arndb.de, Will Deacon , Sasha Levin Subject: [PATCH 02/17] kvm tools: pci: remove BAR 3 hangover from virtio pci msix code Date: Tue, 4 Feb 2014 16:53:50 +0000 Message-Id: <1391532845-2177-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: <1391532845-2177-1-git-send-email-will.deacon@arm.com> References: <1391532845-2177-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);