Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp118864lqg; Fri, 26 Apr 2024 10:16:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWE61+qRZZfTuSKxu0m69X+75PMx3BSMSZcNYD2E8zrGhkIjY4aQFWh8OtQwFDhobsOulMuTUxG+ALjZFgKEwddsazdAFbrHW2mZmJI8w== X-Google-Smtp-Source: AGHT+IHhDxSQdrk98dCmPAeTpiu+ivV16aY3aV19EB5ekbavM2e5jrqKZ4gf6IjBvgkgqd0m3if8 X-Received: by 2002:a05:6358:d095:b0:17e:69cf:2105 with SMTP id jc21-20020a056358d09500b0017e69cf2105mr3570744rwb.29.1714151761219; Fri, 26 Apr 2024 10:16:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714151761; cv=pass; d=google.com; s=arc-20160816; b=iOkX8BzvLIj/h2qgc27pYDHA9gHpfg5Ey4F+l5GBtTeL3+Mx2IlHkuU4T520Gha1/f MyZ7f8PQeU3NMXUQhBFLUTrupqXYQeHGXeHXouEDbryxfjCbTtGDvLxrw2dAtLWeBmO/ gJpGQridxHcnDa9WueGZ/XFjtwaNf4FC6bALfPVRkmtWD7Z/qGsnxh3P07n0ncAWNOBO YNj+pj5YKnk8wmVrfljTJoW6PV6mrJhszY920ogCLNh0KYTPLQQ10AF/33SrUalPeW2F NGPsf5a7j986DPQGjrq7AWwEZy6TTpaxvwqFluik8FSpfAmVTKL5zACjjFzA6gyvTAj4 7ynQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UeeZqHL+h8z9UbdavySxQfAzVMheomhBDIcfUfXFBPA=; fh=oBpbPiDGA9M+4sXi3W4NDpjJlXeQNbwOUMcnypbX9os=; b=nnZT53cipr44wsNbSTh8nhecBCi6gg6lPYacNiHWyltt2+0hT4MMdXAUC8HSr3Idng bWwQexuC/gRRQa7vOdE/x6RmUpd4O/nYUfDd3Fb1RvkKEuL0eIBrpZy5prnlYM3AMbMF ZVMSDtKJ/Bc0v3PHYxiDt/DrpaNnCju3uQ4+5sP8fRtvutKkKIQNd7kk813NUhFtArLQ zKzIl2YMDUA+534WShCL3KNph0//JKdrrcNjdaenMY+kpP4XIr2eqaVjo2UjARNGCZn/ q28uYyp5JlzSnfV9dbohk6Uc/t2qcfUUenxd9Fn+XUsEcTcaCRhJXjHwHJOEsMQviS5h En/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RGdUqkNM; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fd11-20020a056130180b00b007ee7faef8a8si1793387uab.87.2024.04.26.10.16.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 10:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RGdUqkNM; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C11021C21E68 for ; Fri, 26 Apr 2024 17:16:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3442015B0FB; Fri, 26 Apr 2024 17:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RGdUqkNM" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBD8515B120; Fri, 26 Apr 2024 17:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714151752; cv=none; b=bSqGElZ7Ch6Y+Y79+7BVCPXJoOm6YZlm6YCsSeOYDGlP6sPK6qUylvWkasGVH3312lzrB4QZU5I0/ztiUZDLpe/9hVv0emiioFJPP97wpQwNz2+T4Bh7iHt+XTbWw3ximQLWvHf8c1Uc5mbYHQFeYiLzQiWL4aRHbf93wg8HNoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714151752; c=relaxed/simple; bh=4mGPU/2ttUbb1akTXtb4be4f9oyI2PMbjIcwedTgQJM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m17aH/6xPfMRjVSVT8eovHVNhojy8Kv3U3jhNahrTF2555XXiLjlpJQGitV9Bf5QxpiyHlSLWsA7hPltZTHMqFpO2pFiJFUi9Fb+PmqdG2MVyqZmeJ3p/VPX65nP7MlSnM+OQMy3xdqvYdwWuo4+7FdMRkjSe7ADPzd6c+GiNCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RGdUqkNM; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714151751; x=1745687751; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=4mGPU/2ttUbb1akTXtb4be4f9oyI2PMbjIcwedTgQJM=; b=RGdUqkNMR4UzTqd4awzccFNJbIa8R9TfnDJPbM0gfoDQ6xDlkcOG26Sy Thyj/tgPlZWIqucmgNziOW1a6zooqUxSCzWVNpCV20vFZXTL7GyIZw4Y7 kQPCNGx8204j3aPGS2Dr9PK0oqmQOZrU4iAsjuAV9oOCOrS/MIMgIh95j YduziLT3ctwTDWj5ew99rabr6ypEg4DjX9FbdgIF6AxW4jR4jmmKIfELr iR6KwnfxIuI2blvm1rkjb1RE5kEuKj5S/lCT4Obn9qcFDV+UfFcdJocTJ /V7DB7rSdISni7+J/tx3rQ87l7GLNOV+ZL5COrz5tKA9IQkw+4YgCS4Zo g==; X-CSE-ConnectionGUID: 0ynKqLBbQvWRTDadmLtSpA== X-CSE-MsgGUID: lgescHGkRpqF8Agg1FXsrA== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="21044173" X-IronPort-AV: E=Sophos;i="6.07,233,1708416000"; d="scan'208";a="21044173" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 10:15:50 -0700 X-CSE-ConnectionGUID: M64mleqJSvC+pOxFXSFl8g== X-CSE-MsgGUID: AdDV9kkoQOyTHuDgNG0Faw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,233,1708416000"; d="scan'208";a="25358639" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 10:15:47 -0700 Date: Fri, 26 Apr 2024 10:15:46 -0700 From: Isaku Yamahata To: Paolo Bonzini Cc: Isaku Yamahata , Sean Christopherson , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, michael.roth@amd.com, isaku.yamahata@linux.intel.com, rick.p.edgecombe@intel.com Subject: Re: [PATCH 09/11] KVM: guest_memfd: Add interface for populating gmem pages with user data Message-ID: <20240426171546.GR3596705@ls.amr.corp.intel.com> References: <20240404185034.3184582-1-pbonzini@redhat.com> <20240404185034.3184582-10-pbonzini@redhat.com> <20240423235013.GO3596705@ls.amr.corp.intel.com> <20240425011248.GP3596705@ls.amr.corp.intel.com> <20240425165144.GQ3596705@ls.amr.corp.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Apr 26, 2024 at 07:44:40AM +0200, Paolo Bonzini wrote: > On Thu, Apr 25, 2024 at 6:51 PM Isaku Yamahata wrote: > > > AFAIK, unwinding on failure is completely uninteresting, and arguably undesirable, > > > because undoing LAUNCH_UPDATE or PAGE.ADD will affect the measurement, i.e. there > > > is no scenario where deleting pages from guest_memfd would allow a restart/resume > > > of the build process to truly succeed. > > > > > > Just for record. With the following twist to kvm_gmem_populate, > > KVM_TDX_INIT_MEM_REGION can use kvm_gmem_populate(). For those who are curious, > > I also append the callback implementation at the end. > > Nice, thank you very much. Since TDX does not need > HAVE_KVM_GMEM_PREPARE, if I get rid of FGP_CREAT_ONLY it will work for > you, right? Yes, that's right. -- Isaku Yamahata