From patchwork Tue May 13 15:50:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 30090 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D950620446 for ; Tue, 13 May 2014 15:52:41 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id un15sf2392385pbc.0 for ; Tue, 13 May 2014 08:52:41 -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:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=BV1eK7bEEi2W9NK0CTIGpF9sd6YChUJV0D1QtI8m6+Y=; b=BQyxCxXBpyhW36NKg6bv7MrOGBzGC9g4fTKwL/ZB5uLeNM7JiyV3ypKC+Osh/nl4Ex sP/G92mFALqRa532wMMkPuTRH5WfKgKdYSi8PKS4dzZHlPb6pE6lbYBDEwtt5CrGg+eu y6IS7Mdq2lMBgUH3JKI9VYicWFwr7XSXqxsNXpGhKYjFU0AFO44qFT1+p9Q9qKckDZ63 324GnwzEyJu7EMszJVrJ9dZoxZVKQaVwrsrnzFefX/O3cUZBz80s8d/jIxXSzz7oREbl oP8ZrsQ6AaRLRN6Guer0dqiChoj+7LRGFULvoPXLe+1St427br5drTR60MZNTp+0iuFQ qudw== X-Gm-Message-State: ALoCoQk1ykWi4h3PsTGn+vAWbEK7Ir0cUmaEYOPHdH31mdeOnolcdHBR2HEmqRhg1FWhMh2EionJ X-Received: by 10.66.66.35 with SMTP id c3mr15245581pat.7.1399996361188; Tue, 13 May 2014 08:52:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.210 with SMTP id o76ls1886073qga.66.gmail; Tue, 13 May 2014 08:52:41 -0700 (PDT) X-Received: by 10.52.0.176 with SMTP id 16mr786829vdf.60.1399996361070; Tue, 13 May 2014 08:52:41 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ls10si2724354vec.10.2014.05.13.08.52.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 08:52:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db11so683859veb.8 for ; Tue, 13 May 2014 08:52:41 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr29060345vec.4.1399996360995; Tue, 13 May 2014 08:52:40 -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.220.221.72 with SMTP id ib8csp162120vcb; Tue, 13 May 2014 08:52:39 -0700 (PDT) X-Received: by 10.224.92.144 with SMTP id r16mr49713613qam.10.1399996358971; Tue, 13 May 2014 08:52:38 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j2si5589805qga.149.2014.05.13.08.52.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 May 2014 08:52:38 -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 1WkEyd-0008NH-1m; Tue, 13 May 2014 15:50:47 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WkEyZ-0008L5-1g for xen-devel@lists.xenproject.org; Tue, 13 May 2014 15:50:44 +0000 Received: from [193.109.254.147:18729] by server-4.bemta-14.messagelabs.com id F7/C2-02781-25F32735; Tue, 13 May 2014 15:50:42 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-2.tower-27.messagelabs.com!1399996241!4552982!1 X-Originating-IP: [74.125.83.53] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4797 invoked from network); 13 May 2014 15:50:41 -0000 Received: from mail-ee0-f53.google.com (HELO mail-ee0-f53.google.com) (74.125.83.53) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 13 May 2014 15:50:41 -0000 Received: by mail-ee0-f53.google.com with SMTP id c13so550846eek.26 for ; Tue, 13 May 2014 08:50:41 -0700 (PDT) X-Received: by 10.15.50.136 with SMTP id l8mr4845005eew.73.1399996241189; Tue, 13 May 2014 08:50:41 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id m44sm41054917eeh.14.2014.05.13.08.50.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 08:50:40 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 13 May 2014 16:50:20 +0100 Message-Id: <1399996230-18201-5-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1399996230-18201-1-git-send-email-julien.grall@linaro.org> References: <1399996230-18201-1-git-send-email-julien.grall@linaro.org> Cc: ian.campbell@citrix.com, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , Xiantao Zhang Subject: [Xen-devel] [PATCH v5 04/14] xen/passthrough: vtd: iommu_set_hwdom_mapping is VTD specific 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: , MIME-Version: 1.0 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: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.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: This function was exported in common header. Rename it and move the declaration in drivers/passtrough/vtd/extern.h Signed-off-by: Julien Grall Acked-by: Jan Beulich Cc: Xiantao Zhang --- Changes in v5: - Rename iommu_vtd_set_hwdom_mapping into vtd_set_hwdom_mapping Changes in v4: - Patch added --- xen/drivers/passthrough/vtd/extern.h | 2 ++ xen/drivers/passthrough/vtd/iommu.c | 2 +- xen/drivers/passthrough/vtd/x86/vtd.c | 2 +- xen/include/xen/iommu.h | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/drivers/passthrough/vtd/extern.h b/xen/drivers/passthrough/vtd/extern.h index 14cd90e..8ca1f7e 100644 --- a/xen/drivers/passthrough/vtd/extern.h +++ b/xen/drivers/passthrough/vtd/extern.h @@ -103,4 +103,6 @@ void pci_vtd_quirk(struct pci_dev *pdev); int platform_supports_intremap(void); int platform_supports_x2apic(void); +void vtd_set_hwdom_mapping(struct domain *d); + #endif // _VTD_EXTERN_H_ diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index c94b0d1..ae9049e 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1249,7 +1249,7 @@ static void __hwdom_init intel_iommu_hwdom_init(struct domain *d) if ( !iommu_passthrough && !need_iommu(d) ) { /* Set up 1:1 page table for dom0 */ - iommu_set_hwdom_mapping(d); + vtd_set_hwdom_mapping(d); } setup_hwdom_pci_devices(d, setup_hwdom_device); diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c index 218e223..9a458eb 100644 --- a/xen/drivers/passthrough/vtd/x86/vtd.c +++ b/xen/drivers/passthrough/vtd/x86/vtd.c @@ -107,7 +107,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq) spin_unlock(&d->event_lock); } -void __hwdom_init iommu_set_hwdom_mapping(struct domain *d) +void __hwdom_init vtd_set_hwdom_mapping(struct domain *d) { unsigned long i, j, tmp, top; diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index f8da9f2..1fd8fb9 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -127,7 +127,6 @@ void iommu_suspend(void); void iommu_resume(void); void iommu_crash_shutdown(void); -void iommu_set_hwdom_mapping(struct domain *d); void iommu_share_p2m_table(struct domain *d); int iommu_do_domctl(struct xen_domctl *, struct domain *d,