Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1332821rwr; Thu, 20 Apr 2023 13:23:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZBisLeKtRp562gKtAntJJGxogBXX8KCp5vYyLU/UlyhvsXehBzF7Yk1YjQlVVy7Y67R/EG X-Received: by 2002:aa7:88c8:0:b0:63d:254a:3902 with SMTP id k8-20020aa788c8000000b0063d254a3902mr3048434pff.12.1682022238318; Thu, 20 Apr 2023 13:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682022238; cv=none; d=google.com; s=arc-20160816; b=suPsoIZiRZgCNTCYRCiLvYbEFofWSGODg6JLOhQM7EjXnSDoZPb86cGL2y8C2QKNlb CC4wCbKl091KNH0e4rQawu09UryBkStG4REe1d0pZhLPrZvVabaYV0a9IKHstaABR/vp g7wTK4wxSYw/R1tZu+lUIEZUqfGkIsfQtMSWQCpUiYo7pKtzkk7noj2cuV46tn4Fwesp nrhVsadVlco+sN2IqRzVyAdHcGNNVKcNKo5hMUEYVqUFLY3XhK+NT4xchR6Tni7sb2Q5 fDaDYSs9D1RvkzqNbxyJDJwzkPjlREkDL8io3vrwoGpeX2YMD8Y2Er05DWYgPCval+X/ bHaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:dkim-signature; bh=mpTOoqFwr6PXx8ZhPhp2F5vKR6FTzxj9fbkenjMTw+I=; b=Pcl0v3vhBkAPavJGWWzJWolecGlh+3jZQJ3ZGW1yBoFTqtaTxPZDbTrYbmDBDNcfjh FPUogaKLunq8egOX+FZECNoEcRkWdzDEApADlVbD4pEeazgsY6MSj9O3SiToTj/gqFsq 1vzt7HdDIGFXj8beVDXCPvagLsHvbTIQTyGADOLslw9mGqQ7THI1JqBp3u14x5WdJDs+ woYtlPUK7EZhV6XebYDwc9CuNoTPJqH5/h14AG+w6OVvvgaq0Qb43n4Q2RkJLPDZoqZi IQ9oNbpv83/+6f4pqQr3lRcgJoilxLhibluqYvZghqxwnsy51MOA0gW6yE6LSOW49/xS c9Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=ayMsf68d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020aa7998b000000b006367f3bb8a9si2443567pfh.249.2023.04.20.13.23.44; Thu, 20 Apr 2023 13:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=ayMsf68d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232298AbjDTUVd (ORCPT + 99 others); Thu, 20 Apr 2023 16:21:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbjDTUVb (ORCPT ); Thu, 20 Apr 2023 16:21:31 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5BFA1FC2 for ; Thu, 20 Apr 2023 13:21:30 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-2476a718feeso1186929a91.2 for ; Thu, 20 Apr 2023 13:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682022090; x=1684614090; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=mpTOoqFwr6PXx8ZhPhp2F5vKR6FTzxj9fbkenjMTw+I=; b=ayMsf68dO1AJVJrABTkUhl1NMkj9wzJIuYm23qPHqGOJfv8Tzmr/MMZxooBdbFWuv6 cTmzvZGQL22AByne/8vqNIb7Ula7gng50G2+VKpqMx484CV6DQsedQ06XTaeu+DQM49b Xv9bZenL7yQF4ga4/MTIH59v2WCdxiBmdnXbayZvn5qNdcPSs6tpTkKYHX2oOZ/dvVZJ 7iBN8GopMbKfBq0gxr0rs7bCE35mGMrwZMp+IWcuRhn8r0n6FUEqG0/jssdTgwXjPBGo QXUjX+PVWO6OKOdititLEBWM39bjy4BtfGL6XjtBawa9+EgUy4H8fBEsjKUgS+1l2k/k uAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682022090; x=1684614090; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=mpTOoqFwr6PXx8ZhPhp2F5vKR6FTzxj9fbkenjMTw+I=; b=MeOcmV2PIrCUr+LkDF9tBuDN2SYdlMekhcTgNemJOERaO0Ezmy0GfV71TFgUaNW5aW YsGBLgXvBxsQeymVd/XaeXD5GzeXRwQ0WPfBXBVa6kuN0INMpODBfgLSMbEMFvob7D35 GEvh1IV3UTKZaf2pSQe5YPVF1pd6ly25NR4aigBrtpsPA+T9NC1ZGPgmxlAlHXhIJrJu vHailQl+HMtE1kVD6nMhCQUXWgFgUxX21JAkC8vHvgXgwttoaKaQ28FYJdFGpPDqbM6v 7tLYKj+fBsjVHJtLGumWKguVJQHl1QPD1qhq1dnCfrl8p8gfqihXMkaiUzmncRBja03Y ls+Q== X-Gm-Message-State: AAQBX9dsvC8DI4U0Jb9ThYeq2hQqQ7OJw67K8GbDO3j8FldL31Jp0w5c zt3OCUclcwbAeGmyXynn+AxaqL4SKag= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:470b:b0:247:e66:1d90 with SMTP id h11-20020a17090a470b00b002470e661d90mr728232pjg.6.1682022090286; Thu, 20 Apr 2023 13:21:30 -0700 (PDT) Date: Thu, 20 Apr 2023 13:21:28 -0700 In-Reply-To: Mime-Version: 1.0 References: <20230419221716.3603068-1-atishp@rivosinc.com> Message-ID: Subject: Re: [RFC 00/48] RISC-V CoVE support From: Sean Christopherson To: Atish Kumar Patra Cc: linux-kernel@vger.kernel.org, Alexandre Ghiti , Andrew Jones , Andrew Morton , Anup Patel , Atish Patra , "=?iso-8859-1?Q?Bj=F6rn_T=F6pel?=" , Suzuki K Poulose , Will Deacon , Marc Zyngier , linux-coco@lists.linux.dev, Dylan Reid , abrestic@rivosinc.com, Samuel Ortiz , Christoph Hellwig , Conor Dooley , Greg Kroah-Hartman , Guo Ren , Heiko Stuebner , Jiri Slaby , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mayuresh Chitale , Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Rajnesh Kanwal , Uladzislau Rezki Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2023, Atish Kumar Patra wrote: > On Thu, Apr 20, 2023 at 10:00=E2=80=AFPM Sean Christopherson wrote: > > > > On Wed, Apr 19, 2023, Atish Patra wrote: > > > 2. Lazy gstage page allocation vs upfront allocation with page pool. > > > Currently, all gstage mappings happen at runtime during the fault. Th= is is expensive > > > as we need to convert that page to confidential memory as well. A pag= e pool framework > > > may be a better choice which can hold all the confidential pages whic= h can be > > > pre-allocated upfront. A generic page pool infrastructure may benefit= other CC solutions ? > > > > I'm sorry, what? Do y'all really not pay any attention to what is happ= ening > > outside of the RISC-V world? > > > > We, where "we" is KVM x86 and ARM, with folks contributing from 5+ comp= anines, > > have been working on this problem for going on three *years*. And that= 's just > > from the first public posting[1], there have been discussions about how= to approach > > this for even longer. There have been multiple related presentations a= t KVM Forum, > > something like 4 or 5 just at KVM Forum 2022 alone. > > >=20 > I did mention about that in the 1st item in the TODO list. My apologies, I completely missed the todo list. > Thanks for your suggestion. It seems we should just directly move to > restrictedmem asap. Yes please, for the sake of everyone involved. It will likely save you fro= m running into the same pitfalls that x86 and ARM already encountered, and th= e more eyeballs and use cases on whatever restrictemem ends up being called, the b= etter. Thanks!