Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5547322yba; Mon, 13 May 2019 12:48:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9qsp2WuIfH2sGtnOHlrZiuupo9Cdj9f+iHFkcWGiicK9YxsYj2laFLalifzAK/jbslvq+ X-Received: by 2002:a63:5c5b:: with SMTP id n27mr34025532pgm.52.1557776900890; Mon, 13 May 2019 12:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557776900; cv=none; d=google.com; s=arc-20160816; b=YEM31wobz6yZXaenxCJQl2GyESI/UkKVMu4LUfAt1DSQQv3/B6EFPZ5jCV2I9QvRQS rLEYECIBZR+cfd9dElGIg8/asc922VLCmSMNaUWfvm7HlBhWCSnqIWw9naQrdTPtfw7H Mg0nCra4DPEK0xtiKXKDu/0s/x3BvZd3ieuUkAYD7XCKQ8VxvKd6ezCDxZFmxQeho3TO ZG4Pkz/VzAdnxPbcPEVBC/l7cDcim8eZ48Twzg199/tKkilmvHPBqQLu+dKFqQLWey97 hpDvalKBiBdv7dvu2gfj3ig9yWazH+XAuzVDkLPJ8YAS8wtOb7R43M947GjVXQ6/zCKO PsXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=E9lLDpiAybp5oI5DGq5XRxoJEmZNLZXtN8BwGUOu470=; b=asXZeOZ4d2HIUo/KXqaIb789SEia2WKQLDG58Ea6jj+oNHbQ7wwZ7g5ps+1MdWcZnq gK7dIbMvZ50CAMuW8wq/wy8IornMg+vrM6F4VJivXd7iDosEXiWwnRzo/XqiBe3ABXXw B4wBd6JJ6LFBVeyQbZBf1FiHb/CtkM3/fWdUVHIv2twhrXJVPygILRN2tpl3MDyxLIbV 4o8eKOHSZj3WAJy+QvK/6BPXYNliikOfnOvzjfuGji+Z1ZZ7kuxlLy1cuNrQizkQ12GB 5ZBi72ECDzo7rAGDevy8bx5gWTqJPrZ4MAhgl7rysElCNyPR8pqs1dZExiU6i5ABnPqH 86/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VJfYnS+5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b70si16077476pfj.166.2019.05.13.12.48.04; Mon, 13 May 2019 12:48:20 -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=pass header.i=@kernel.org header.s=default header.b=VJfYnS+5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfEMSSz (ORCPT + 99 others); Mon, 13 May 2019 14:18:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:54064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfEMSSz (ORCPT ); Mon, 13 May 2019 14:18:55 -0400 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14E6521707 for ; Mon, 13 May 2019 18:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557771534; bh=0D70YYCaYJ/0FfOh4xzmgNQF/8UOkldQ6uPFbgG5pwI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VJfYnS+5yGbxOPZ/IrGIvPvGQ3MWsey8Zcw2ynEdyFK0bMhb6EA9kn+qh0dub8jNy BUnM34hwwZ1Svmkf5b+KeyY5QW3SWsWXC0ncGsSlKjnU7m5z/A5Z5cT9X6y3liCLay edErDf2BS2T6yENCy2PLIQTWiBRyIZLCTwIbQJ9Q= Received: by mail-wr1-f54.google.com with SMTP id r4so16346572wro.10 for ; Mon, 13 May 2019 11:18:54 -0700 (PDT) X-Gm-Message-State: APjAAAXENqr5fBjR/w6DHo41ki2Ayba0+TdnjAR30e9OL83xmfVzGcIM p5QDVagGB2EKELjU7wa2vd/hz1DCunF+vB+f1DB+Cg== X-Received: by 2002:adf:ec42:: with SMTP id w2mr17777817wrn.77.1557771532684; Mon, 13 May 2019 11:18:52 -0700 (PDT) MIME-Version: 1.0 References: <1557758315-12667-1-git-send-email-alexandre.chartre@oracle.com> <1557758315-12667-19-git-send-email-alexandre.chartre@oracle.com> In-Reply-To: <1557758315-12667-19-git-send-email-alexandre.chartre@oracle.com> From: Andy Lutomirski Date: Mon, 13 May 2019 11:18:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC KVM 18/27] kvm/isolation: function to copy page table entries for percpu buffer To: Alexandre Chartre Cc: Paolo Bonzini , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andrew Lutomirski , Peter Zijlstra , kvm list , X86 ML , Linux-MM , LKML , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Liran Alon , Jonathan Adams Content-Type: text/plain; charset="UTF-8" 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 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.