Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1413096ybl; Fri, 6 Dec 2019 17:13:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzg6xbqaZs7jB/fQKorxrkAyOoSJx6m4pby1QUPJt5TcTkuj8VSo8sWXWHwgeNRGdR4oTLz X-Received: by 2002:a9d:70cb:: with SMTP id w11mr8777690otj.157.1575681231552; Fri, 06 Dec 2019 17:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575681231; cv=none; d=google.com; s=arc-20160816; b=QvWBaQInmFcxnYRrpYfGLGO6g2WzTXRfNP8sHSBBAejqra2CJY+HWI2q56yNTp2KRg qpmdkS5HfeBOaxkR7OBitVl7311MudF8Yq1Kz0/Q+hVE6d9eg5Mi42BiGtycQbvXvRd4 wMH4G9NRqkh8KY0H/fPmpHxtGMyRy97WpQFF/piGZ+BUFZFgtCFsSP7CsRQfZEIKZteQ nZqAbmn8+pi2P4dbEgPotfxQX6umVS1CRVRUDsgUnGraSZxsCcmuPPckaL2AZiOfqbjO tUaEy573oF7hXlo2UGBOooQdWdXkdUj+U0ugY7wu6dTMtZ+ihDSZuYeeXgyfU5c6Z0HT Wsrw== 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=AfM3G1kbnaWkdImNxAyLnOfa2yUI+oRdd0Y4OlaFslo=; b=G/rzIur+I0Cu+V+e3uHeiLIjUEakP1YMOJVHdr0/qHIeqAgGSVEIEg9YylJx9XhFDf 8ip43XESjXc29iwcPlyTSKX6M3cM+AgQ1FIpntbHC2Gct/6AVVFOyRijtRJwGdZcJpNW m6+w2El44sjcYhooETAytzH1g+9nBW4UZi6Ywy9T/f+ozocsM0AKlSn5nOdr+8hipv1U EAykd2Xug3TADZp6QKXWMWRK0f8+gJGuVAxOpH+wpHabe2Ac+gy71lcibr9ICnFR1FaQ aKmeq1JuHh79NsTHUL4mrrSClkz2UDiGRoGMgJfMpWJ2JSn97py0GI3nQjlXOoRkLhmT xVag== 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 l125si8495408oih.223.2019.12.06.17.13.39; Fri, 06 Dec 2019 17:13:51 -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 S1726416AbfLGBNI (ORCPT + 99 others); Fri, 6 Dec 2019 20:13:08 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:28666 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726371AbfLGBNI (ORCPT ); Fri, 6 Dec 2019 20:13:08 -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 xB71CQwF124511 for ; Fri, 6 Dec 2019 20:13:05 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wq9hph2ww-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 06 Dec 2019 20:13:05 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 7 Dec 2019 01:13:04 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 7 Dec 2019 01:12:59 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xB71CwdX2032102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 7 Dec 2019 01:12:58 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3AD7F4C04A; Sat, 7 Dec 2019 01:12:58 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 217724C040; Sat, 7 Dec 2019 01:12:54 +0000 (GMT) Received: from oc0525413822.ibm.com (unknown [9.80.215.155]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sat, 7 Dec 2019 01:12:53 +0000 (GMT) From: Ram Pai To: mpe@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, 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, leonardo@linux.ibm.com Subject: [PATCH v5 0/2] Enable IOMMU support for pseries Secure VMs Date: Fri, 6 Dec 2019 17:12:37 -0800 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19120701-0028-0000-0000-000003C62762 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19120701-0029-0000-0000-000024894E8C Message-Id: <1575681159-30356-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-12-06_08:2019-12-05,2019-12-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 mlxlogscore=620 suspectscore=1 malwarescore=0 lowpriorityscore=0 adultscore=0 spamscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912070004 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: v5: unshare the page used in H_PUT_TCE_INDIRECT hcall to communicate the TCE entries with the hypervisor. Concern raised by Alexey. This minimizes the number of pages shared with the hypervisor. v4: Corrected the Subject, to include the keyword 'PATCH'. No other changes. 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 VM. arch/powerpc/platforms/pseries/iommu.c | 43 ++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 13 deletions(-) -- 1.8.3.1