From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CD01C433E0 for ; Wed, 8 Jul 2020 13:18:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C93382067D for ; Wed, 8 Jul 2020 13:18:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C93382067D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 268398D0008; Wed, 8 Jul 2020 09:18:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 217A76B00C4; Wed, 8 Jul 2020 09:18:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E01F8D0008; Wed, 8 Jul 2020 09:18:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id E8AD96B00C3 for ; Wed, 8 Jul 2020 09:18:19 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 905B9181AEF00 for ; Wed, 8 Jul 2020 13:18:19 +0000 (UTC) X-FDA: 77014962318.26.band93_3f0ed1226ebd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 619871804B647 for ; Wed, 8 Jul 2020 13:18:19 +0000 (UTC) X-HE-Tag: band93_3f0ed1226ebd X-Filterd-Recvd-Size: 5069 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 8 Jul 2020 13:18:18 +0000 (UTC) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 068D2RCA106547; Wed, 8 Jul 2020 09:18:17 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 325dxe9ryn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 09:18:16 -0400 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 068D34YN107846; Wed, 8 Jul 2020 09:18:15 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 325dxe9rvk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 09:18:14 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 068DHqDE031516; Wed, 8 Jul 2020 13:18:10 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 3251w8gbx9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 13:18:09 +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 068DI7C955836784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 13:18:07 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AFF504204C; Wed, 8 Jul 2020 13:18:07 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5F63642042; Wed, 8 Jul 2020 13:18:05 +0000 (GMT) Received: from in.ibm.com (unknown [9.85.75.251]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 8 Jul 2020 13:18:05 +0000 (GMT) Date: Wed, 8 Jul 2020 18:48:03 +0530 From: Bharata B Rao To: Ralph Campbell Cc: linux-rdma@vger.kernel.org, linux-mm@kvack.org, nouveau@lists.freedesktop.org, kvm-ppc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , Andrew Morton , Shuah Khan , Ben Skeggs Subject: Re: [PATCH 0/5] mm/migrate: avoid device private invalidations Message-ID: <20200708131803.GB7902@in.ibm.com> Reply-To: bharata@linux.ibm.com References: <20200706222347.32290-1-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706222347.32290-1-rcampbell@nvidia.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-08_11:2020-07-08,2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 cotscore=-2147483648 mlxscore=0 phishscore=0 clxscore=1011 adultscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080091 X-Rspamd-Queue-Id: 619871804B647 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jul 06, 2020 at 03:23:42PM -0700, Ralph Campbell wrote: > The goal for this series is to avoid device private memory TLB > invalidations when migrating a range of addresses from system > memory to device private memory and some of those pages have already > been migrated. The approach taken is to introduce a new mmu notifier > invalidation event type and use that in the device driver to skip > invalidation callbacks from migrate_vma_setup(). The device driver is > also then expected to handle device MMU invalidations as part of the > migrate_vma_setup(), migrate_vma_pages(), migrate_vma_finalize() process. > Note that this is opt-in. A device driver can simply invalidate its MMU > in the mmu notifier callback and not handle MMU invalidations in the > migration sequence. In the kvmppc secure guest usecase, 1. We ensure that we don't issue migrate_vma() calls for pages that have already been migrated to the device side (which is actually secure memory for us that is managed by Ultravisor firmware) 2. The page table mappings on the device side (secure memory) are managed transparent to the kernel by the Ultravisor firmware. Hence I assume that no specific action would be required by the kvmppc usecase due to this patchset. In fact, we never registered for this mmu notifier events. Regards, Bharata.