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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22639C4332F for ; Mon, 6 Nov 2023 16:05:13 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=oEmvQq09; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4SPGQb522dz3cVm for ; Tue, 7 Nov 2023 03:05:11 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=oEmvQq09; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--seanjc.bounces.google.com (client-ip=2607:f8b0:4864:20::1149; helo=mail-yw1-x1149.google.com; envelope-from=3gw5jzqykdpqoawjfyckkcha.ykihejqtlly-zarheopo.kvhwxo.knc@flex--seanjc.bounces.google.com; receiver=lists.ozlabs.org) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SPGPg3hzQz2yNf for ; Tue, 7 Nov 2023 03:04:21 +1100 (AEDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5a9012ab0adso64335487b3.1 for ; Mon, 06 Nov 2023 08:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1699286659; x=1699891459; darn=lists.ozlabs.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=oEmvQq09lW20bFQB/kfj09X92ChYHaZOUz0dtL6McCByNl0eGHczKbMay0bqbQUjmT QUD3W/n+mYobvuVGrldejRFqL5rJ8Iz5NnUzaQnPJhWlq2nJAl3iE5mK4oZ3YTM8AOdb mBX4kkoCSPYwu76mCNGuZ5gKGv+HRDofv6GRyULV/4hed7BMEuhXIkiEsdo3Bha0MdeT tn6cPfI20j0mP12X4/w6HufiMjcgfPNbIauylZQALbLO9cS9ba/7qgaIkQWEO9sjJtSC HRxmrQBSlTtWnxd9YwLF8fJPplZUgUhZCOz76AHQub6Lt3sWm1te14IAJYNRa8hr/cnY WbqA== 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=YowLxjUOmch826opycUPWf9bZMYcRuz0sicILPyra+NkPtY6P1jtjsQdPJdWd7gr9y CPcxHWmxRszBErZ0/AN/vHb9oXN1R0Lz38d+ZXu/vntgY0Dg0RIZnhWn8Xtt46DH0kR3 tJ25CFiZM3OXxRDUY8+Q3eT7e+ZLO/OQi/WU+PpXndsZZvv6Dwrr5YBnX6nEAoI9WDku O0bPTUO4R/vwzC0e2d5NVQ80s0diSyp7koGFS7r7fh/KVCQzL8S3B5MPcu1YfWBPr2sj Owb9XfVsz37P5AgfCwsGXORuNPcqju+3Ju2JpBgJpdX/HPlgHuPPM7teJlh7wEuEv54Y O+iQ== X-Gm-Message-State: AOJu0YxKrO047denI1Rsch/OkdXZYUmWu7E40rx6zen/v/H19kmbdXsC /EzfL8XkZx2lCe9mVOuKW9eefpy56ng= X-Google-Smtp-Source: AGHT+IG4M/eznhqFxpL/eWUumIXP2aANvxiOg95OzhM2lh4aiDVuodrpXWON7UbLhWxQPiRYqqCoKKt9NcE= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chao Peng , linux-riscv@lists.infradead.org, Isaku Yamahata , Marc Zyngier , Huacai Chen , Xiaoyao Li , "Matthew Wilcox \(Oracle\)" , Wang , Vlastimil Babka , Yu Zhang , Maciej Szmigiero , Albert Ou , Michael Roth , Ackerley Tng , Alexander Viro , Paul Walmsley , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Isaku Yamahata , Christian Brauner , Quentin Perret , Liam Merwick , linux-mips@vger.kernel.org, Oliver Upton , David Matlack , Jarkko Sakkinen , Palmer Dabbelt , "Kirill A. Shutemov" , kvm-riscv@lists.infradead.org, Anup Patel , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Andrew Morton , Vishal Annapurve , linuxppc-dev@lists.ozlabs.org, Xu Yilun , Anish Moorthy Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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.