From patchwork Fri Aug 15 03:14:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 35421 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 90837202E4 for ; Fri, 15 Aug 2014 02:53:12 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id q200sf5768979ykb.9 for ; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=bw7zybSM1m2KVzXHVjGaXd+dnlFPcqR1lriKFyJQVSU=; b=lzaIsG5GGiQTHr9dDnVaRH+rACwZvGpMh12Ow2VRzRoLFs6lv4KV7rPuqIXd6mhvG5 S+gXmbXCM3DB5hcc/OchS/rjjw6azs32m/BgUPPd2ykf7/xvb4IgH6r3ae6qctp6XmSa dDTy2SQqTm/mDP/J7i5C/F3KeFvmKJfoBKVdreqHcRue/jocJ98GMCXgtGwtzcrnMhsO KZn4O1GPcmZkXr1YfWxjPH2PfoRPzkZKvcA2SdclzN7WjBXMvCWF+RfsbOLWblU/dait Kp/iyo28VON+cM9FxdApHJgvNUpPpNG3QfUfyi9Osfso7ZfxKjXDeFviol2R0sB0b7I/ v/Ig== X-Gm-Message-State: ALoCoQlyBuCKIkrWymDXjUbOoJuzZsc2CEckDh3VZs1bKteClZtQ4dKyaOOyh3IZLUpTZUQwgo48 X-Received: by 10.236.112.234 with SMTP id y70mr4641449yhg.32.1408071192393; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.34 with SMTP id c31ls357915qge.92.gmail; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) X-Received: by 10.140.85.135 with SMTP id n7mr22203394qgd.22.1408071192326; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id u9si10168491qai.52.2014.08.14.19.53.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Aug 2014 19:53:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so2376531vcb.8 for ; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) X-Received: by 10.220.182.73 with SMTP id cb9mr8053969vcb.9.1408071192049; Thu, 14 Aug 2014 19:53:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp81008vcb; Thu, 14 Aug 2014 19:53:11 -0700 (PDT) X-Received: by 10.50.25.41 with SMTP id z9mr22151936igf.0.1408071191233; Thu, 14 Aug 2014 19:53:11 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j11si429392igf.27.2014.08.14.19.53.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Aug 2014 19:53:11 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XI7ba-0007mD-KX; Fri, 15 Aug 2014 02:51:02 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XI7bZ-0007m8-1U for xen-devel@lists.xenproject.org; Fri, 15 Aug 2014 02:51:01 +0000 Received: from [193.109.254.147:59497] by server-9.bemta-14.messagelabs.com id 60/9A-31535-4957DE35; Fri, 15 Aug 2014 02:51:00 +0000 X-Env-Sender: wangyijing@huawei.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1408071020!12603261!1 X-Originating-IP: [119.145.14.64] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NCA9PiA4MDE5MQ==\n X-StarScan-Received: X-StarScan-Version: 6.12.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 11882 invoked from network); 15 Aug 2014 02:50:55 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (119.145.14.64) by server-9.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 15 Aug 2014 02:50:54 -0000 Received: from 172.24.2.119 (EHLO szxeml401-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAI22404; Fri, 15 Aug 2014 10:49:20 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml401-hub.china.huawei.com (10.82.67.31) with Microsoft SMTP Server id 14.3.158.1; Fri, 15 Aug 2014 10:49:12 +0800 From: Yijing Wang To: Bjorn Helgaas Date: Fri, 15 Aug 2014 11:14:37 +0800 Message-ID: <1408072477-10008-1-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Cc: Yijing Wang , linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH 3/3] xen/MSI: Retrieve MSI msg from cached msi_desc->msg X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangyijing@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: We had cached the MSI msg in __write_msi_msg(), so we should retrieve the cached MSI msg directly, not to access the MSI address/data hardware registers again. Signed-off-by: Yijing Wang CC: Konrad Rzeszutek Wilk CC: xen-devel@lists.xenproject.org --- arch/x86/pci/xen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 4656099..7a74404 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -228,7 +228,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) return 1; list_for_each_entry(msidesc, &dev->msi_list, list) { - read_msi_msg(msidesc, &msg); + get_cached_msi_msg(msidesc, &msg); pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff); if (msg.data != XEN_PIRQ_MSI_DATA ||