From patchwork Sat Oct 30 16:59:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 292272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9UH2glO031957 for ; Sat, 30 Oct 2010 17:02:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755315Ab0J3Q7O (ORCPT ); Sat, 30 Oct 2010 12:59:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12397 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755256Ab0J3Q7N (ORCPT ); Sat, 30 Oct 2010 12:59:13 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9UGxCHa025635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Oct 2010 12:59:12 -0400 Received: from s20.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9UGxBcu028685; Sat, 30 Oct 2010 12:59:11 -0400 From: Alex Williamson Subject: [PATCH 1/5] vfio: Fix the ROM mask To: pugs@cisco.com Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, avi@redhat.com, chrisw@redhat.com, mst@redhat.com, alex.williamson@redhat.com Date: Sat, 30 Oct 2010 10:59:11 -0600 Message-ID: <20101030165901.885.82395.stgit@s20.home> In-Reply-To: <20101030164626.885.89216.stgit@s20.home> References: <20101030164626.885.89216.stgit@s20.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 30 Oct 2010 17:02:42 +0000 (UTC) diff --git a/drivers/vfio/vfio_pci_config.c b/drivers/vfio/vfio_pci_config.c index 88deb19..8af995d 100644 --- a/drivers/vfio/vfio_pci_config.c +++ b/drivers/vfio/vfio_pci_config.c @@ -797,7 +797,7 @@ static void vfio_bar_fixup(struct vfio_dev *vdev) if (pci_resource_start(pdev, PCI_ROM_RESOURCE)) { mask = ~(pci_resource_len(pdev, PCI_ROM_RESOURCE) - 1); - mask = PCI_ROM_ADDRESS_ENABLE; + mask |= PCI_ROM_ADDRESS_ENABLE; } else mask = 0; lp = (u32 *)(vdev->vconfig + PCI_ROM_ADDRESS);