Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4971392ybc; Fri, 15 Nov 2019 12:50:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzPqVZFDCMyE1tXgpF59s93mIwpLxzAYjvnkMnr16/f6ndw6s9uEz8cyu+L7/DR33zHXZrx X-Received: by 2002:a17:906:4a0c:: with SMTP id w12mr3760400eju.306.1573851044473; Fri, 15 Nov 2019 12:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573851044; cv=none; d=google.com; s=arc-20160816; b=IaQ2tg70+b1m9ElNioKsTkVzZ/GdGeB7moyux0IsXhWJ7YbvQ7LffFOTDYaMfPiazx xvdzxzmDA4IigebCdPaJKiNcAgaYskIwET8ewgmspZgltW5qND4JZkV0pjru9H7D6qIB 9lJpueESfL0moEF+gR5mWopyPS6MiCzVZ5dJGoHokRH0OXlAc+JXgxPXRt0ttS//bhre G63StczXaIyQV1ETqb2x6RUUf0TtUDys5IJKpXyqoHexCoQ9xG3lnK/9Y8Y8KpqngGXr Zbso4I3WiWS6Rbwgy9rNK/9CUubYGXyux3HQLUiea2+3kcTNtp9bjGGaXxSMkSKLVZFB Fffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=hYAN2MwpELbBbXtvC55UumGLjdL6jTEDa0B4s3N4vzU=; b=BP6XNWbS3fB5nCuK9J21cGd4+owVUx7L151ADATOH2XS+fZNgG3UdrzKUQgMSK+nyh Xv3ALfXkxT2C0uqq4Qku3bL8PNLV8rUppG1SLwC5wMSrJ35Hj/xVkTDD6hQCbmzXiVon 4iZrasm0maECb8O1prHSLSgUy57lKZuPrCk/wwsSvlpLwjg6smNZ1kE688rrhX2gw40e kRLSwjTM/JyJcnmvgBWPRAmsmaZaQe9SJud2Uzkyxd6uw/8RVZp5q5gc9R4bP0iDTgMR LBtexkPeTPJyrybOWO7ZfGXRI3awYNZtdnud/hE7i8LRLMnS0NqpaZRpP/P4bNP1lkt0 W6CQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s28si7885479edc.98.2019.11.15.12.50.19; Fri, 15 Nov 2019 12:50:44 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbfKOUtV (ORCPT + 99 others); Fri, 15 Nov 2019 15:49:21 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26976 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726550AbfKOUtV (ORCPT ); Fri, 15 Nov 2019 15:49:21 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAFKliCq141105 for ; Fri, 15 Nov 2019 15:49:19 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w9nsmxy7t-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 15 Nov 2019 15:49:19 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Nov 2019 20:49:17 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 15 Nov 2019 20:49:12 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAFKnADx55836738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Nov 2019 20:49:10 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 86EB342042; Fri, 15 Nov 2019 20:49:10 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F21542041; Fri, 15 Nov 2019 20:49:07 +0000 (GMT) Received: from oc0525413822.ibm.com (unknown [9.85.181.122]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 15 Nov 2019 20:49:06 +0000 (GMT) From: Ram Pai To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au 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, pasic@linux.ibm.com Subject: [v3 0/2] Enable IOMMU support for pseries Secure VMs Date: Fri, 15 Nov 2019 12:48:29 -0800 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19111520-4275-0000-0000-0000037E4E37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111520-4276-0000-0000-00003891B93C Message-Id: <1573850911-19590-1-git-send-email-linuxram@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-15_06:2019-11-15,2019-11-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 malwarescore=0 impostorscore=0 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=505 suspectscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911150185 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series enables IOMMU support for pseries Secure VMs. Tested using QEMU command line option: "-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4, iommu_platform=on,disable-modern=off,disable-legacy=on" and "-device virtio-blk-pci,scsi=off,bus=pci.0, addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0, iommu_platform=on,disable-modern=off,disable-legacy=on" changelog: v3: Better description of 2/2 patch. Suggested by David Gibson. v2: added comments describing the changes. Suggested by Alexey and Michael Ellermen. Ram Pai (2): powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor. powerpc/pseries/iommu: Use dma_iommu_ops for Secure VMs aswell. arch/powerpc/platforms/pseries/iommu.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) -- 1.8.3.1