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=-7.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 1D653C4360C for ; Wed, 25 Sep 2019 12:14:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D5FA1217F4 for ; Wed, 25 Sep 2019 12:14:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="UBKXw+KB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5FA1217F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6F51E6B000D; Wed, 25 Sep 2019 08:14:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6AE426B026E; Wed, 25 Sep 2019 08:14:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 595236B0272; Wed, 25 Sep 2019 08:14:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 383EB6B000D for ; Wed, 25 Sep 2019 08:14:19 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id B6A8E181AC9BF for ; Wed, 25 Sep 2019 12:14:18 +0000 (UTC) X-FDA: 75973335396.08.rings24_5fca4935f5841 X-HE-Tag: rings24_5fca4935f5841 X-Filterd-Recvd-Size: 5117 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Sep 2019 12:14:18 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id 3so6227567qta.1 for ; Wed, 25 Sep 2019 05:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OVI5QcSzb1ogi/NUyHxPnF5WpljeLCICuHCH4hdkAkk=; b=UBKXw+KB2suz9U44y3DYouGbrl88Nm90V8Wsw6X6eao3v1Q0ZOHIayVjqW+Ac3JAvt BY6j3a/CYJYhIbLmMzgIGsa8RV2A3l9vXW8f9p1ttZxvLTVKnQLShFUp6JQlpw2y4Ekf bDDPdMuQ5Wr7VcgyCJKxU/EoDJaxxx7EduDRntUPBHNNBjO0ib4vI0mGe0w0vT4jrR6s q8B4JocD6DLLs3AjJKgk1eyUF9CgK4k2G0luzKUrOC9gCPk3JjFCP2aRbvrqJ1w0IgG3 a30U1ABEbjgWv6xsD/m/zZhSphCGVVOqzC/hWn/nfgEoVjLo+hUjSMo4uZJP5XYQ/n5q p5ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OVI5QcSzb1ogi/NUyHxPnF5WpljeLCICuHCH4hdkAkk=; b=sl5DjfYrZS7ckjMAXWs2lKJgR3OUKnoGCyB+4okKIM3Sw4yfoTn0XpSeIdu2FtJpHT EP3YE2sQLHR+4JV9zAYxVVVAf55mh3rza5PoEC3fgJ0YXy2cdiE+B1m0TNQDYclkMoiT BzAkeF52Xx00KARLM/yrc7NFfODmfkrY0ciIGQz2eZXKZCksN2tiAwKAVIVi+XQdGOmL 5l+B63t61Tpr2FIF6ZaLzyCxSFVQYKC2VGScriPgVCkg0DiUWAG4LoUCuWaHHFgiXPdT Ceey+aHo3k1oJ96+PNIKC73gQJDHjdm8UTFOa/j+rXHwboZGzgP75g6y6VphM5vuePJb AZLw== X-Gm-Message-State: APjAAAUnwcCA9B+2cWnzCSwgpOikU/wq+mpP5j2ahWWUX+xB1+W9oGti ACYeBv1mJ6Vo/7d6QfYq8r8XlQ== X-Google-Smtp-Source: APXvYqykvxxYrfpTCuPObZS7Ml2gjLGRZXElIM5Y2CTDjEL5CnkfFtmLsczbvBhS+BMu1uKuOdCYXw== X-Received: by 2002:a0c:a5a5:: with SMTP id z34mr6930777qvz.110.1569413657491; Wed, 25 Sep 2019 05:14:17 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-167-223-10.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.223.10]) by smtp.gmail.com with ESMTPSA id h29sm3163953qtb.46.2019.09.25.05.14.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2019 05:14:16 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iD6BU-0006VE-9u; Wed, 25 Sep 2019 09:14:16 -0300 Date: Wed, 25 Sep 2019 09:14:16 -0300 From: Jason Gunthorpe To: Bharata B Rao Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-mm@kvack.org, paulus@au1.ibm.com, aneesh.kumar@linux.vnet.ibm.com, jglisse@redhat.com, linuxram@us.ibm.com, sukadev@linux.vnet.ibm.com, cclaudio@linux.ibm.com, hch@lst.de Subject: Re: [PATCH v9 0/8] KVM: PPC: Driver to manage pages of secure guest Message-ID: <20190925121416.GB21150@ziepe.ca> References: <20190925050649.14926-1-bharata@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190925050649.14926-1-bharata@linux.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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 Wed, Sep 25, 2019 at 10:36:41AM +0530, Bharata B Rao wrote: > [The main change in this version is the introduction of new > locking to prevent concurrent page-in and page-out calls. More > details about this are present in patch 2/8] > > Hi, > > A pseries guest can be run as a secure guest on Ultravisor-enabled > POWER platforms. On such platforms, this driver will be used to manage > the movement of guest pages between the normal memory managed by > hypervisor(HV) and secure memory managed by Ultravisor(UV). > > Private ZONE_DEVICE memory equal to the amount of secure memory > available in the platform for running secure guests is created. > Whenever a page belonging to the guest becomes secure, a page from > this private device memory is used to represent and track that secure > page on the HV side. The movement of pages between normal and secure > memory is done via migrate_vma_pages(). The reverse movement is driven > via pagemap_ops.migrate_to_ram(). > > The page-in or page-out requests from UV will come to HV as hcalls and > HV will call back into UV via uvcalls to satisfy these page requests. > > These patches are against hmm.git > (https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=hmm) > > plus > > Claudio Carvalho's base ultravisor enablement patches that are present > in Michael Ellerman's tree > (https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/ppc-kvm) > > These patches along with Claudio's above patches are required to > run secure pseries guests on KVM. This patchset is based on hmm.git > because hmm.git has migrate_vma cleanup and not-device memremap_pages > patchsets that are required by this patchset. FWIW this is all merged to Linus now and will be in rc1 Jason