From patchwork Mon Apr 22 23:12:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 238692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2F79B2C014B for ; Tue, 23 Apr 2013 09:12:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923Ab3DVXMR (ORCPT ); Mon, 22 Apr 2013 19:12:17 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:46678 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753063Ab3DVXMR (ORCPT ); Mon, 22 Apr 2013 19:12:17 -0400 Received: by mail-ie0-f175.google.com with SMTP id a11so16618iee.6 for ; Mon, 22 Apr 2013 16:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=QQIDA7FcQvv+AVHDNWJIRmYnw3xnQIJC6JC3NgXVFFs=; b=WKX2TkFm69Ina0Om6/y8XZ16UgpVE45uaFxmLlsg+Hf7aVV28YNhbZhYZzg8lPc3k8 /C1IhDfzAQG467OyvnbnIiqqNlyuZzyIFT7gxqRLUOJFcDh/0vIZUwf/mv3lVKNFLESF NgxxcATU9HvIAmNhORow5ne7+6K5pTuWQ0qgEnX3ghqUbfdVnN9K1cbMfDDH8AjizWOf PNnpQ2imQUzjTg9UXJD8qDFOPn9YmVrXeeddGrMxNMIYHz2/eqTg2MmUlw9NIYA7M1D7 lVvY5ldj+UMlolRHWvZlj5svvZW/Jv7mzcEnYK+vm1dwwFdSHADZnj3SVBzNhZ11MvZi b4+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=QQIDA7FcQvv+AVHDNWJIRmYnw3xnQIJC6JC3NgXVFFs=; b=CXfwblzoBCfavyZ2j4e+55J0Mk5CXGso5owzDTAFdVky5g+i0TqHYdzUlkxPZwErLP PTJzblAPY8yrbeYRiHSKDuL4Bf9D90Vm5LBYglNFy4sC+JhKBLCfCbyk++RN6FzqzC3u LVQMKRWaV4UZB15zivvLdOF9HD6Zk5Wl1LUbbzO8MwkLSvjdgoXeCCMZHE0Oa+oXkdhg 7MrHgqWMTRAdvH8XpajieqNVgX5ZQgWKBxcawF6SaLd9loZcghFnGhUNDd67HgurVhMX LFZL054i01ciFOZsLp5pjSh6aaLWpeaTToyfn7S7BqKnoSNu13Wp3Qo9eyrR0rqP6RvS VBiw== X-Received: by 10.50.78.232 with SMTP id e8mr7883564igx.72.1366672336752; Mon, 22 Apr 2013 16:12:16 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPSA id p9sm17882632iga.7.2013.04.22.16.12.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:12:16 -0700 (PDT) Subject: [PATCH v4 18/22] xen/pci: Pay attention to PCI_MSIX_TABLE_OFFSET To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Gavin Shan , Konrad Rzeszutek Wilk Date: Mon, 22 Apr 2013 17:12:14 -0600 Message-ID: <20130422231214.32621.37394.stgit@bhelgaas-glaptop> In-Reply-To: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> References: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQm8YojFvN8QckTLetuHSc/xQes4pMuP71zIh8k4UrQw/Ac8FFBB4Jqs5YwHYzhYH41tLR8F6cnG0TB7r5gbLtKbnVhn/J9GcWX5dpx8Bs+Em2ru8eoBtNPv4Gyz5el5G3JUxFFA6GEkm1c5xjcgiX/SUZOW88ZQOfTC3Wnf6JjgMDLl6DsXs7RBDQGrzh6M6Aer5gptKn2kQ5e9d/QEB0TrW31SP9AqqaKYp5OqBjsMSEe/EM4= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The MSI-X Table structure may be at a non-zero offset into the device BAR, and we should account for that. Signed-off-by: Bjorn Helgaas CC: Konrad Rzeszutek Wilk --- arch/x86/pci/xen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 94e7662..0e8a196 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -300,8 +300,10 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) pci_read_config_dword(dev, pos + PCI_MSIX_TABLE, &table_offset); bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); + table_offset &= PCI_MSIX_TABLE_OFFSET; - map_irq.table_base = pci_resource_start(dev, bir); + map_irq.table_base = pci_resource_start(dev, bir) + + table_offset; map_irq.entry_nr = msidesc->msi_attrib.entry_nr; }