Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2224702rdf; Mon, 6 Nov 2023 08:04:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyEK7dxsE3Z/DYHg/qqu78Q5ISZu/IDKBUep9O6MZcDyeEUP+k3JVBp8hX9w6ZZvWo5klz X-Received: by 2002:a05:6870:9a8d:b0:1ef:c696:7815 with SMTP id hp13-20020a0568709a8d00b001efc6967815mr133708oab.42.1699286684590; Mon, 06 Nov 2023 08:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699286684; cv=none; d=google.com; s=arc-20160816; b=upKjVe0bcOzRJV33Oqp9hok6XDIXp4vRJm+erPMMipUveudiBfXyuqOuDH8z1nXgO1 CTJynoovHfuamIUD9YUzjMkM86H79+E8kT6+/XAsfThw/HDGDohkJe6xXs5wq/ACaICo +fE35cB40Jnmwdm+E+pz4C7XLdKCTvisY/eD3cfWL8JcfNYyOPR/UYXjaN/IJF3TNvyP JZn5PLF94FHWmz/QlyQHJe02Unb75FZ5EAOJiJVdLoTIYLT5iXqDYhuhyPAYkMjzyauu VHTnlyMWsnncfWUIE2QEV8KThlbjdB5gishfIhdlJyp3SBCFCW4ejWv9Gljau/L7KlPO gCRg== 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=vBcfSXW+7b0RYZr/CwodaGuIC1t2rSK8z82L7NdJqdg=; fh=P5PSl5+yGLC/mg6/A51ivzu5Y/AooYK7zXVJ7WfYZMk=; b=tj9tNbODWhiopM+bIUBrw+YePOBgHEOyX7rmURl96KNWQ79pe6eQQprpaKOw8jiFQW crFUQHA21xG3OjGI3nue6lKY0TTJhQV/B+n6WAoND+go8ewZR7tMbG2gU1nUdW4RSq00 7ALeHSIHK+YSxoHmjcfPBRnY9q+MGoslVhz+UnQSLBH7xpyyXu4ibvBAMGLUZb5H1e9j igkRcTe8+37Nvy6z/VB8rL2+lMXWsiVQkVmJ7U5BTaR8dRdZYs2oE6mxG3y6cJx2f0xF KygYytoogkmYHUWK+prq4XoLX2n3th1eyuhpMJ9s2EdLb2uK1Zgd9CTmgkmEPdd4gEnG WVdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wFpslrgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id nj1-20020a056871450100b001ea3f7b9d25si3305679oab.270.2023.11.06.08.04.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 08:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wFpslrgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 68A6280BD50D; Mon, 6 Nov 2023 08:04:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbjKFQEY (ORCPT + 99 others); Mon, 6 Nov 2023 11:04:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjKFQEX (ORCPT ); Mon, 6 Nov 2023 11:04:23 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C741D45 for ; Mon, 6 Nov 2023 08:04:20 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5ae5b12227fso64364877b3.0 for ; Mon, 06 Nov 2023 08:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1699286659; x=1699891459; darn=vger.kernel.org; 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=vBcfSXW+7b0RYZr/CwodaGuIC1t2rSK8z82L7NdJqdg=; b=wFpslrgmIgIbaZOnLmqhhsJ9lDbgt0QTYXsM/t9b7FrC5cgpaymNsWQX/WWEoi7FQr E/bE/k+zCfeCsDQ6kp5smusq2Mr+EUiKnNmREGKBUaW+YC3SO+yS8VAGYnKZsvJ77fOE fMAnL0JHqR6sUtdNJjBm8Aik+fy2iGwNJW9rhJx2SBQ4S4UM5m/tLtDrWXuhjn3+ZHrm 06Afvfng0cn8QBQcKGDsPnW+8DCJJpE4VHZCoiIaWRFxleb/9ugM75rY0RRFQSVvHZYx CeVPu3Fh483VCoEqrQSAnCd1jwLIhpCHNNho6qiGzNqwXXphlYb7mMh8JmrGlazciaNh sIWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699286659; x=1699891459; 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=vBcfSXW+7b0RYZr/CwodaGuIC1t2rSK8z82L7NdJqdg=; b=Okn2VCBSLteENKYZ+TdYcQGnPsHKcBiP29uO2LFE+CCLKTaY9dWGoQT9JWEyFi7zCl XQL7q3EbVcnqNGMkECs5pRBhuebmqFk6DwPz5cJOm2xbmhJG2lBOOer52EE+Jz5+ffEg ZgDTv0eJgbe5yIhHP5bqVbYtzTu1KES6/TU89ef8ZWhvlay5OefFuOC+N66LMiUgLJaE dQfU6NQwc++wl/BTsWYiMC5oIGoTAQ/qf7XPO2II89glELEubm/CRSIBGHy2/+YX39bp DskwwVGzyaCf9vvxWgd8lV1sXMkV4PE86EyC1hQQpEm+zuYOzS3zsLNEe7fFQyJwYfFY b3bQ== X-Gm-Message-State: AOJu0YyZs52kK006Tw7MYLJvzrfXMaaevW9a4BwhYCRDUv4E2F1zP5K3 vpMjukV3wg9p6VHHgr1RBVtfdcu9Gos= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:830d:0:b0:5a8:6162:b69 with SMTP id t13-20020a81830d000000b005a861620b69mr214046ywf.3.1699286659321; Mon, 06 Nov 2023 08:04:19 -0800 (PST) Date: Mon, 6 Nov 2023 08:04:17 -0800 In-Reply-To: Mime-Version: 1.0 References: <20231105163040.14904-1-pbonzini@redhat.com> <20231105163040.14904-28-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH 27/34] KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type From: Sean Christopherson To: Fuad Tabba Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , "Matthew Wilcox (Oracle)" , Andrew Morton , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Xu Yilun , Chao Peng , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , "=?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?=" , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A. Shutemov" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 08:04:40 -0800 (PST) On Mon, Nov 06, 2023, Fuad Tabba wrote: > On Sun, Nov 5, 2023 at 4:34=E2=80=AFPM Paolo Bonzini wrote: > > > > From: Sean Christopherson > > > > Add a "vm_shape" structure to encapsulate the selftests-defined "mode", > > along with the KVM-defined "type" for use when creating a new VM. "mod= e" > > tracks physical and virtual address properties, as well as the preferre= d > > backing memory type, while "type" corresponds to the VM type. > > > > Taking the VM type will allow adding tests for KVM_CREATE_GUEST_MEMFD, > > a.k.a. guest private memory, without needing an entirely separate set o= f > > helpers. Guest private memory is effectively usable only by confidenti= al > > VM types, and it's expected that x86 will double down and require uniqu= e > > VM types for TDX and SNP guests. > > > > Signed-off-by: Sean Christopherson > > Message-Id: <20231027182217.3615211-30-seanjc@google.com> > > Signed-off-by: Paolo Bonzini > > --- >=20 > nit: as in a prior selftest commit messages, references in the commit > message to guest _private_ memory. Should these be changed to just > guest memory? Hmm, no, "private" is mostly appropriate here. At this point in time, only= x86 supports KVM_CREATE_GUEST_MEMFD, and x86 only supports it for private memor= y. And the purpose of letting x86 selftests specify KVM_X86_SW_PROTECTED_VM, i= .e. the reason this patch exists, is purely to get private memory. Maybe tweak the second paragraph to this? Taking the VM type will allow adding tests for KVM_CREATE_GUEST_MEMFD without needing an entirely separate set of helpers. At this time, guest_memfd is effectively usable only by confidential VM types in the form of guest private memory, and it's expected that x86 will double down and require unique VM types for TDX and SNP guests.