Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6041666yba; Tue, 14 May 2019 00:11:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSPnA66pcy2mT5c7UXIUg89NaT19GdTWS391Xbz2V6iwhXrlU6VbmNBaJyyzk9PxDZr6CC X-Received: by 2002:a17:902:9a03:: with SMTP id v3mr37314114plp.27.1557817897749; Tue, 14 May 2019 00:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557817897; cv=none; d=google.com; s=arc-20160816; b=avwsptxDsB7XxwfrpfQY7GWyUuH6JrL0SsxnYSqQEs03F+WN7EFjsjyVIThlBeDLfe j1dIAueJwXgZ77zFsOV2H8JCjbDcashmxwmxe9EjWHYVqMena4FCRTTiMD3jJD713/51 wXJAD5H0QFe5wC4TXxE6OU6/ReEltmcLo2c+UOZypr3jf90tuvTuyVowiYCuAm7X72C8 KfZQkzX7cNrieTt8ScuT3IMRW4TWcQ59Pl1VVgvmf94sadx0nu0DPnTbbx99O7S7Wxhi /O1QtNGsvW+dn7JRhMo3MTrUJre72M0ar0n/iIH/CXdqZXAPMuZ3qPSify6PykW6fQlB NjTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/z5RzNGJzW1HToa5OVxP0O9danntTUkXNkeid122vEM=; b=Q0edeuiknjRA917oZrJafzZl3Q372OWsuC3Z/ZB0dLoFtM2RagQeH+V/SzOfC3xCRm vpusgO/6drul0x7Jd1awYTEFv9RuhbMgHtJ7nrmY0GlPXr8L6DkuGRpZJ0e3EciEcI54 2/tGQRodsmmFD+lxF6s3WsmD1yHtsXvABZS2P+7vlrojraBv0BsrKAxRecnlvucEiWsL SKmon05+3lLpVCJusn0EZSb3zjUgYQMT+bnaPmp1sL1mS2a4AQHO/ed68Z5B1sh/ceA4 N3cZijXhzNeL/d7qZOt6/bgCZ5BQgk6jTWvaDiaSVwYH3FSVWMxA+bN/iwwb5AD2MLWS /m3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="uX/PF8/B"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si1043569pfr.226.2019.05.14.00.11.22; Tue, 14 May 2019 00:11:37 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="uX/PF8/B"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbfENHJw (ORCPT + 99 others); Tue, 14 May 2019 03:09:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55886 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbfENHJv (ORCPT ); Tue, 14 May 2019 03:09:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/z5RzNGJzW1HToa5OVxP0O9danntTUkXNkeid122vEM=; b=uX/PF8/BZSeVv5cPYS/kBWxFp UDDr+gcUIfetuw8aGDKQAfysqqZJaUz81VHEMON8xTdLLiTpmvG5WCRkt/CEY21gb3D6P2AlCsjNa sf0i36/+rwA+lGQOrFddAhvfXScybliJbFvtwsTcLmcFia80AO9SPV6fbZAreQpv5iwSvaXbG5clt qAWW+0m229JhnOySjs3Bm0qnNwoc5kzUN/Zdjgf7IEFS/vVTiv9X4ZmIi0PMu6AnplhZzKcMcqcbA pBmJBkzg/ZEv1TJPg3f7a2OKjgL7A/SQEMkkAMbOx0FX6IMKXMEaIGyTsnQkbUyFo8ri6RR70llLI uwPjbMl2g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQRZH-0006YZ-Fs; Tue, 14 May 2019 07:09:43 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 032842029F87A; Tue, 14 May 2019 09:09:41 +0200 (CEST) Date: Tue, 14 May 2019 09:09:41 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Alexandre Chartre , Paolo Bonzini , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , kvm list , X86 ML , Linux-MM , LKML , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Liran Alon , Jonathan Adams Subject: Re: [RFC KVM 18/27] kvm/isolation: function to copy page table entries for percpu buffer Message-ID: <20190514070941.GE2589@hirez.programming.kicks-ass.net> References: <1557758315-12667-1-git-send-email-alexandre.chartre@oracle.com> <1557758315-12667-19-git-send-email-alexandre.chartre@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 13, 2019 at 11:18:41AM -0700, Andy Lutomirski wrote: > On Mon, May 13, 2019 at 7:39 AM Alexandre Chartre > wrote: > > > > pcpu_base_addr is already mapped to the KVM address space, but this > > represents the first percpu chunk. To access a per-cpu buffer not > > allocated in the first chunk, add a function which maps all cpu > > buffers corresponding to that per-cpu buffer. > > > > Also add function to clear page table entries for a percpu buffer. > > > > This needs some kind of clarification so that readers can tell whether > you're trying to map all percpu memory or just map a specific > variable. In either case, you're making a dubious assumption that > percpu memory contains no secrets. I'm thinking the per-cpu random pool is a secrit. IOW, it demonstrably does contain secrits, invalidating that premise.