Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp771150ybx; Thu, 7 Nov 2019 02:27:42 -0800 (PST) X-Google-Smtp-Source: APXvYqw5xwXxpw06a0onFAwBr3rT53uirI81MwbvAVc6lDTrIzgFNNELQp5a/jptoNsTdy4DdXBa X-Received: by 2002:a17:906:5044:: with SMTP id e4mr2257192ejk.27.1573122462021; Thu, 07 Nov 2019 02:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573122462; cv=none; d=google.com; s=arc-20160816; b=ny5iS0jok3VDcJ1EJ+ZxZRFnZLctAJHi8PO3FvXkegVDg6KO8BfT1e1NfTYEs6KRqr TzroykPiIQC0xqKK6DnjHiFYa/CbMcBYcYnA5OZZ2f/IVmoIPNAK+ax2vmGbSQouWKe0 XjKs8OHf9PVhSUQWdHnmg4r94iHMOAkkG+4FPOcbuEex94lY1T+MKgAEJ2OHnyzCTVHv I3k/nAlogxYICJHELfF6v4lFyA+dL9pgNwhjTNGvGvdF8NBEpFxE4HfuyFsKqJoRWOGb fB45K2KQB9v2C3seM5reHS/kQdrdcZJ6zwexL63opmJH3aiyYZR4LmRsiyYUD2thPs8v Mxfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=NsKsNaDUZlUQwuesbL8c6RDwbJAsaIbcX+1Cni789sw=; b=FXcZHM9ULb3NiFwHKxx3MDxkakUJ/GT2u17Yy1N6rAAgAZMOV20Ge1zx0XVwZFsvi9 NaMTeEbj2BCMCIx7zu4c3EuexNdHLz2dbVVTHg7agc/2eEEAu3TgfIU1T7r9Uqw4i+7g 7clANHH4DP0yTKc6pcj1b5PqFaWpsnOgmYD+1gPFGSmvfyUSLTT+zL1rDPE7z2HUlENK LIWc0XmExjlZSQlV7l4V028tucg5QgtdToWzV3nDR7iM4QLAFkuedGTj5ZUAPCA78BwX waSOujbywjbjXnqjra82Z5oVIUxSJelRr9jCV7Y0+zZ04f6TVN8kAIgyrrluSPT5CQr4 44AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=gb5wc+hW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si1093194ejb.136.2019.11.07.02.27.18; Thu, 07 Nov 2019 02:27:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=gb5wc+hW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387821AbfKGK0e (ORCPT + 99 others); Thu, 7 Nov 2019 05:26:34 -0500 Received: from ozlabs.org ([203.11.71.1]:38627 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbfKGK0e (ORCPT ); Thu, 7 Nov 2019 05:26:34 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 47801f5SWCz9sPT; Thu, 7 Nov 2019 21:26:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1573122391; bh=ubT6PqHfq+AeskgzniFZvOikXlHxhlqZ5cQjsrS0lnQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gb5wc+hWL6b3Ya0OtGZix/sJtUue+204GeoQas8US15HICstxZ6MRb2umgOieCFtU tWQs99Bxp0Yj0OgxFyw4ItXJq4B85MoXu32FHmXJJtfQiAdj9aPEQuBwaVDllUDxP9 MlFZLvd+TSUoWnRv7YTnrRClNDLH+hhP9lW0oGcog0c7uzG6s7VUjNqKW16QFJzZz4 Un9NpYnNSvlucUMGeg00xE+Az8F/e3URCB2Vmrgw9mC+/DpXJ4g6RLVQUSmjbstMi8 Q1ima+wUoaMn0mwroazcEZk4jB2LBbwIrH7yCZRdQn4SD1BvK3hc26dAmxSnzbKCP8 xJKrpXUcxgaIg== From: Michael Ellerman To: Ram Pai , linuxppc-dev@lists.ozlabs.org Cc: benh@kernel.crashing.org, david@gibson.dropbear.id.au, paulus@ozlabs.org, mdroth@linux.vnet.ibm.com, hch@lst.de, linuxram@us.ibm.com, andmike@us.ibm.com, sukadev@linux.vnet.ibm.com, mst@redhat.com, ram.n.pai@gmail.com, aik@ozlabs.ru, cai@lca.pw, tglx@linutronix.de, bauerman@linux.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [RFC v1 2/2] powerpc/pseries/iommu: Use dma_iommu_ops for Secure VMs aswell. In-Reply-To: <1572902923-8096-3-git-send-email-linuxram@us.ibm.com> References: <1572902923-8096-1-git-send-email-linuxram@us.ibm.com> <1572902923-8096-2-git-send-email-linuxram@us.ibm.com> <1572902923-8096-3-git-send-email-linuxram@us.ibm.com> Date: Thu, 07 Nov 2019 21:26:28 +1100 Message-ID: <87k18c56ej.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ram Pai writes: > This enables IOMMU support for pseries Secure VMs. Can you give us some more explanation please? This is basically a revert of commit: edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests") But neglects to remove the now unnecessary include of svm.h. > diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c > index 07f0847..189717b 100644 > --- a/arch/powerpc/platforms/pseries/iommu.c > +++ b/arch/powerpc/platforms/pseries/iommu.c > @@ -1333,15 +1333,7 @@ void iommu_init_early_pSeries(void) > of_reconfig_notifier_register(&iommu_reconfig_nb); > register_memory_notifier(&iommu_mem_nb); > > - /* > - * Secure guest memory is inacessible to devices so regular DMA isn't > - * possible. > - * > - * In that case keep devices' dma_map_ops as NULL so that the generic > - * DMA code path will use SWIOTLB to bounce buffers for DMA. Please explain what has changed to make this no longer necessary. cheers > - */ > - if (!is_secure_guest()) > - set_pci_dma_ops(&dma_iommu_ops); > + set_pci_dma_ops(&dma_iommu_ops); > } > > static int __init disable_multitce(char *str) > -- > 1.8.3.1