From patchwork Tue Apr 22 13:14:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 28801 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DADF1203AC for ; Tue, 22 Apr 2014 13:16:11 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id z60sf3570838qgd.1 for ; Tue, 22 Apr 2014 06:16:11 -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=N5EgXDS8g9ObHfIwfL41KDTEQm0rrrdVZLwn7EtTgcU=; b=DgKaIB1RxtXgQD/jjisBPSjIfqxpHIwA2GMed5urPA/eDSZqYcTctoBpLN9ou3DbUY loPmtITM3VWzLzqo9Z9uTfOehfKEXSZfg5tG2x0n4KcIn2d9Ra3hYUtVp1LtoRzq7jEW k01sDrwGsIg/DjHzQ3dyj9ALsJN46PoL0FdrCnXnqwyzE7BEhh3pBPgTtfzRRetGAGmR IGIAkezYx23zBPGHKnXaSNlCHxjv01om6V3VQ3rlBzRkthRdyoVYa8/el+TrBaVkMXVP lFG7sC2QEEP3Ockva4WihN6YB9dQIL4m9fERPF/XX37sW1lw54sO2RlHHMHBVxzZbmKr V3rw== X-Gm-Message-State: ALoCoQlLUuMKxFzeJcmwg7rihIzZQHVJ4He9JD561cUNnR6y8zllcnwYzskJw0SYClWbZL5v6P1y X-Received: by 10.236.66.169 with SMTP id h29mr20167407yhd.34.1398172571546; Tue, 22 Apr 2014 06:16:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.247 with SMTP id b110ls102713qge.16.gmail; Tue, 22 Apr 2014 06:16:11 -0700 (PDT) X-Received: by 10.52.78.231 with SMTP id e7mr7073116vdx.28.1398172571437; Tue, 22 Apr 2014 06:16:11 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sc7si6882377vdc.13.2014.04.22.06.16.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 06:16:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id il7so2514167vcb.4 for ; Tue, 22 Apr 2014 06:16:11 -0700 (PDT) X-Received: by 10.58.13.104 with SMTP id g8mr35978375vec.16.1398172571305; Tue, 22 Apr 2014 06:16:11 -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 ib8csp23837vcb; Tue, 22 Apr 2014 06:16:11 -0700 (PDT) X-Received: by 10.224.16.69 with SMTP id n5mr48740595qaa.7.1398172570916; Tue, 22 Apr 2014 06:16:10 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id di5si16819579qcb.20.2014.04.22.06.16.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 22 Apr 2014 06:16:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) 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 1WcaXM-0005xT-G6; Tue, 22 Apr 2014 13:15:00 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WcaXJ-0005sn-5O for xen-devel@lists.xenproject.org; Tue, 22 Apr 2014 13:14:57 +0000 Received: from [193.109.254.147:54894] by server-4.bemta-14.messagelabs.com id E3/F9-02781-05B66535; Tue, 22 Apr 2014 13:14:56 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-27.messagelabs.com!1398172495!122820!1 X-Originating-IP: [74.125.83.44] 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 14534 invoked from network); 22 Apr 2014 13:14:55 -0000 Received: from mail-ee0-f44.google.com (HELO mail-ee0-f44.google.com) (74.125.83.44) by server-14.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 22 Apr 2014 13:14:55 -0000 Received: by mail-ee0-f44.google.com with SMTP id e49so4600509eek.17 for ; Tue, 22 Apr 2014 06:14:55 -0700 (PDT) X-Received: by 10.14.218.193 with SMTP id k41mr55573226eep.16.1398172495199; Tue, 22 Apr 2014 06:14:55 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id 45sm112969867eeh.9.2014.04.22.06.14.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 06:14:53 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 22 Apr 2014 14:14:22 +0100 Message-Id: <1398172475-27873-9-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398172475-27873-1-git-send-email-julien.grall@linaro.org> References: <1398172475-27873-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 v4 08/21] 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=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 Cc: Xiantao Zhang Cc: Jan Beulich Reviewed-by: Jan Beulich --- 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..823420d 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 iommu_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..081fe97 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); + iommu_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..7196c82 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 iommu_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,