From patchwork Wed Jun 1 19:52:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9148081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7D0D460467 for ; Wed, 1 Jun 2016 19:55:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 717D820410 for ; Wed, 1 Jun 2016 19:55:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BC926C9B; Wed, 1 Jun 2016 19:55:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1780120410 for ; Wed, 1 Jun 2016 19:55:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8CCk-00029B-Qf; Wed, 01 Jun 2016 19:53:26 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8CCj-00028g-Mt for xen-devel@lists.xen.org; Wed, 01 Jun 2016 19:53:25 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 09/9D-15735-43D3F475; Wed, 01 Jun 2016 19:53:24 +0000 X-Bright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agelabs.com!1464810803!42554064!1 X-Originating-IP: [157.56.111.94] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13824 invoked from network); 1 Jun 2016 19:53:24 -0000 Received: from mail-bn1bon0094.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.111.94) by server-8.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 1 Jun 2016 19:53:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SwufjGYSiPmlTcALGrZgv/EaxJPxgzvavaLBT6mjIf8=; b=dU8mv1F5UsQjYVaneoeDl4avJtIEROjnJS6sh7VT0mgyChAgpYRT/iYIZO3JbbzKK2/6fci3FCgYvYBMmutw6i4bpRaIe0W7rt8CRsyAtoJxXupLLFX8xyCGRY+gzGws2Vx+BsBvrBx7GI+RCCBnWanJeag5eJ09dfubFTIzQ9w= Received: from ssuthiku-cz-dev.amd.com (165.204.77.1) by BLUPR12MB0433.namprd12.prod.outlook.com (10.162.92.139) with Microsoft SMTP Server (TLS) id 15.1.506.9; Wed, 1 Jun 2016 19:53:14 +0000 From: To: , , , Date: Wed, 1 Jun 2016 14:52:59 -0500 Message-ID: <1464810780-1640-2-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464810780-1640-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1464810780-1640-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY1PR14CA0021.namprd14.prod.outlook.com (10.161.91.31) To BLUPR12MB0433.namprd12.prod.outlook.com (10.162.92.139) X-MS-Office365-Filtering-Correlation-Id: 7c0e2252-0daa-42d8-c82a-08d38a566219 X-Microsoft-Exch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PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BLUPR12MB0433; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0433; X-Forefront-PRVS: 096029FF66 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(76176999)(50986999)(5004730100002)(5001770100001)(586003)(36756003)(3846002)(33646002)(86362001)(42186005)(53416004)(6116002)(8666004)(2201001)(50226002)(86152002)(5008740100001)(189998001)(2950100001)(229853001)(2876002)(92566002)(48376002)(19580405001)(81166006)(2906002)(5003940100001)(4326007)(47776003)(50466002)(66066001)(19580395003)(8676002)(77096005)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0433; H:ssuthiku-cz-dev.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR12MB0433; 23:63ReNcvWklcCNZPY6zbljq9DMDmUjLUY3p51FUZUY?= =?us-ascii?Q?6DEOzjWVjUV7zjIn8gp6370La7AsCZaH5YGnfAbvQ2SmRPfxX+SMTSrgLDj8?= =?us-ascii?Q?HgoSFWxZDaQYfH1p/RTe2lJ8WXopd0qtcdLbUEiwJ5o1Ek2uwEKmEFtyQxEf?= =?us-ascii?Q?dPQJQMT2G+ZIzbP+a/CiV9OmduEm9aNv6WdeExNrOKzA6cGWcNhekP7CtkoP?= =?us-ascii?Q?mhJZwQEhSZ1LDEV7dEN4vKEzGSSlZatpvB0/CuICqEuJG5gtVUBqFnZdI3IO?= =?us-ascii?Q?Y/ijIQwGkNaiCFLva6BFydUi5huz4VAg6YkaRJKWvSkDq0rl5m/UwQexUB4h?= =?us-ascii?Q?TUow8dw0PJknhGdbRIaF51JZNiRd3MhoeEdbxX4Rcv6jYCcY+cO3a3nSfYmb?= =?us-ascii?Q?P5Fd4HK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5CKxe2XzJReXULjuLm1q/vZtGR6cORwa4YeiJTd49umz9W2OmtsyqVwUr7nfZXBVQ8XEHYmhb9Oq8qiwL8f0Esv8+OyHqfEqHJo0TWI7WSOdv52BiOlF8ei4XjppK5CNI2BDsw+C67nJKAvFnu0=; 20:MAbVDL+RFmkxGsx73h+b3/eTpjsz4P58nBPVxOHBkhYrsE5CBrgqA5gf76ROCNWmMU++2ujt5+T42ms+zQq5QkUdvClEoV/X/1kQHK8Z0gC8iV8JOv6wqYxMvp2WNQ9qFdBGLx9UeK9yAjeo7H3CT3NNG63o5kt/lMvCLvihU1m9tkrP0shQ58phm2tB5LDxCgDEfFx+cOynKbjYgZjalCHokW4oed9/eiT0o5s/CHR5wdluX53PmCE4IbIW4ne4 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2016 19:53:14.5327 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0433 Cc: keir@xen.org, Suravee Suthikulpanit Subject: [Xen-devel] [PATCH v4 1/2] AMD IOMMU: Removing currently non-functioning guest iommu feature X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Suravee Suthikulpanit The guest IOMMU feature is currently not functioning. However, the current guest_iommu_init() is causing issue when it tries to register mmio handler because the it is currently called by the following code path: arch/x86/domain.c: arch_domain_create() ]- drivers/passthrough/iommu.c: iommu_domain_init() |- drivers/passthrough/amd/pci_amd_iommu.c: amd_iommu_domain_init(); |- drivers/passthrough/amd/iommu_guest.c: guest_iommu_init() At this point, the hvm_domain_initialised() has not been called. So register_mmio_handler() in guest_iommu_init() silently fails. This patch removes the guest IOMMU feature for now until we can properly support it. Signed-off-by: Suravee Suthikulpanit Reviewed-by: Paul Durrant --- xen/drivers/passthrough/amd/pci_amd_iommu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c index 70b7475..fce9827 100644 --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c @@ -272,9 +272,6 @@ static int amd_iommu_domain_init(struct domain *d) hd->arch.paging_mode = is_hvm_domain(d) ? IOMMU_PAGING_MODE_LEVEL_2 : get_paging_mode(max_page); - - guest_iommu_init(d); - return 0; } @@ -474,7 +471,6 @@ static void deallocate_iommu_page_tables(struct domain *d) static void amd_iommu_domain_destroy(struct domain *d) { - guest_iommu_destroy(d); deallocate_iommu_page_tables(d); amd_iommu_flush_all_pages(d); }