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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 15F1DC5DF62 for ; Wed, 6 Nov 2019 05:58:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B8FE82075C for ; Wed, 6 Nov 2019 05:58:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ozlabs.org header.i=@ozlabs.org header.b="VHiP8nxh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8FE82075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2FEB36B0266; Wed, 6 Nov 2019 00:58:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B0AE6B0269; Wed, 6 Nov 2019 00:58:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C4376B026A; Wed, 6 Nov 2019 00:58:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id 013786B0266 for ; Wed, 6 Nov 2019 00:58:33 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id AFED8180AD81A for ; Wed, 6 Nov 2019 05:58:33 +0000 (UTC) X-FDA: 76124798106.19.trade18_84e7f42b6e614 X-HE-Tag: trade18_84e7f42b6e614 X-Filterd-Recvd-Size: 2397 Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 Nov 2019 05:58:33 +0000 (UTC) Received: by ozlabs.org (Postfix, from userid 1003) id 477G6q1YXnz9sP6; Wed, 6 Nov 2019 16:58:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1573019907; bh=fe1cfYqlG7NpLDENgEEgJGCJ15l6iPBAhlJyBRCiARo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VHiP8nxhMyffu/D9d9yF1JnkErmzswDreT+8f+fPbuQgyBQSZ3CZzopDPCERkENrd FzxnwBZPsu9KtkRYrsl0FmjxNEw5p0Xba9Q+qSsA62WPZJORrz9ZJuM9fej42+ImA5 0Wi7JoXEqENFNgM80xi0pE3fhr+UAtsAFybft4Fn5TduNkcT4cWbQX19lxfCu1weWW 2Vu2Dvk3h/rMEU9P/LMRsIJD5Jgqqre+AjPWu4uNWkPvAeoYrA4Y2lCELjxObrT5lW mCl7MKn6N2GfPUKj9sWSHT4jfak3uCfqWi3YOL32lNx7hb+cuTIy51WRubgzc8p10a zufv0lF3FxTUw== Date: Wed, 6 Nov 2019 16:58:23 +1100 From: Paul Mackerras 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, cclaudio@linux.ibm.com, linuxram@us.ibm.com, sukadev@linux.vnet.ibm.com, hch@lst.de Subject: Re: [PATCH v10 4/8] KVM: PPC: Radix changes for secure guest Message-ID: <20191106055823.GE12069@oak.ozlabs.ibm.com> References: <20191104041800.24527-1-bharata@linux.ibm.com> <20191104041800.24527-5-bharata@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191104041800.24527-5-bharata@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000117, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 04, 2019 at 09:47:56AM +0530, Bharata B Rao wrote: > - After the guest becomes secure, when we handle a page fault of a page > belonging to SVM in HV, send that page to UV via UV_PAGE_IN. > - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. > - Ensure all those routines that walk the secondary page tables of > the guest don't do so in case of secure VM. For secure guest, the > active secondary page tables are in secure memory and the secondary > page tables in HV are freed when guest becomes secure. Why do we free the page tables? Just to save a little memory? It feels like it would make things more fragile. Also, I don't see where the freeing gets done in this patch. Paul.