Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp906718lqb; Wed, 17 Apr 2024 14:34:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCW+U2xtLszq38GlXNueKNNzrGDCdx5+idsZBmv+uyFmUSVjCIpwoU3zFMn5Dd63t4iEHLKDqkKDQukgcoLIqwsKRpaklSABdkPj3BJA== X-Google-Smtp-Source: AGHT+IHZEwRMM45TW8eOm1PauJrTrJd/4gyhkilBl9qAZKDzrcCyHH1w9/MBT1U2VB6hCTAkXrKu X-Received: by 2002:a05:620a:1d94:b0:78e:de30:93f5 with SMTP id pj20-20020a05620a1d9400b0078ede3093f5mr632572qkn.31.1713389695200; Wed, 17 Apr 2024 14:34:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713389695; cv=pass; d=google.com; s=arc-20160816; b=Mro9jCWVO2pZfVYLt6olOONHiQCbgrydA99hNxbKq2r/rnDjHsdPSzBM/TzYJG5spU yGDYiwsWxI9FZQwmjexz0GWXHVVMT5cAgsX7SeblZjqogm50gKMVYbtKuJuN8qnWvI2s hBfhA268aixxdLAvWlkyeagQXulwghdw/f4SbyHibEZF3C0XZJBi2bKOLNuuM5Lclmom jfbyLKeVkmuWZgfSo8WEjCUbnFTFyNakwQtLRve0k52ZJehSXdlG5cn5DGyzI0G65ddU i2BP7VoZK+SFdA76uSBiN8AOyXR2alMTDnKw09q3el2pOclb8cdFpaFjYItQwDHkfBA/ ti/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=FtcRdic/pWCdYOXnVvo78eeJmsM1IAgH+M6Omc9kMKA=; fh=yK3GKIDyoPLB52TOJp5veFuVUe/KZ3MiH9HMH72Eoi0=; b=DaItETdeNpUCr3Q7K81p2jRe1WBgNb606pVCCOSQdNPbUmN9KZbjjbH/lGPMjdUoWe 9ExpMDxwtpSDA5FJwgMqZFk+mq8PCsJ6nu9a1nxN+Kn1jwVjFlM6NB1Z/Qu9KaaXhnad /KpT+BxYDngDF1ReISuTDvQuH2ltIk9nfANE881/sLGDAeGrQRt2GdOLxEt3X8mr4sQ9 eT77hdLSFnAsBxswtrJHEMHunMXqxyv4L82QYhJ8bDPv12VRtZKqn/9mVffBxIGCr8ST yn+FCoWvrFuahN1BjrVODEx2N/6yugAmwkTXwj7aNAeOKoE8blLxbUxk985wFqTRHMo0 fweQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=NCsWuLeS; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-149261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 vu21-20020a05620a561500b0078d747da301si93330qkn.163.2024.04.17.14.34.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 14:34:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149261-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=@google.com header.s=20230601 header.b=NCsWuLeS; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-149261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 E827C1C20DB1 for ; Wed, 17 Apr 2024 21:34:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4673784D3F; Wed, 17 Apr 2024 21:34:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NCsWuLeS" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AEF465190 for ; Wed, 17 Apr 2024 21:34:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713389685; cv=none; b=rZfa8Y7Cyj86vMGbR6VRK59Su7pjS4WhmAfuwX/H41RCg4nLdnPZFwC0qUmIzRZ4l93Oh4uCc7Qphpo1GYE6auR7q7fgkfeSdbu8iuU4dOG78Pb8J2iKH/agIW+4/q3gNblEHpwz2X5LygcG0YT+nTUdfABJUB4cvPe7KXjoZK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713389685; c=relaxed/simple; bh=AXiEFpjwutkI1b7D7DrnphTAmx4kZakjusToR/aZCUk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=egmKD/By5qsOKW8K6zB/BrOm74wb41BtOVrLVrykN+HebAPHAwNSU+MvCrIY9rXHGnaulNhxagO5pqgJ4snVRJumQq+P9bCwPbXBq2d9LVIC2G7mFIoBXeP4qzjm8DiV2O5pDVE0iRPfshGNU6yD96JVo31s0ubCKAbmzxf13RI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NCsWuLeS; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60cd62fa1f9so2599627b3.0 for ; Wed, 17 Apr 2024 14:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713389683; x=1713994483; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FtcRdic/pWCdYOXnVvo78eeJmsM1IAgH+M6Omc9kMKA=; b=NCsWuLeSK+t00r1THrqfXqjWnAGtihxjLawB7hnqdnV+WPrEf7f0iZ7Is/48yEr0oq 3Ur0BQXAT8y92Pz9xu6PuharR/WMlUehUUaZTm2wtyjVbvlYwXE+gaiqlxR96szkdI8Q hYdHPeyjn83suyyeL7E4Jg4D55mnzZ2Q23oBoZvLQ74cG0+m7hnjcX9Y57+3q1n9EQiO CgpVvLpVdK+YDtEGuLBF0+y1MJUzqT3cPKzJMbnf32akzGNHQYLDpLv8sxZftaqEETjT y9rCQvAstvCGuPqCqvvZSf5D+fJjnubjuWqowrGraswEXTZh5TTBpUrrAaDr2K4Ng6Wt rILA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713389683; x=1713994483; h=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=FtcRdic/pWCdYOXnVvo78eeJmsM1IAgH+M6Omc9kMKA=; b=K9RTniBim5cpZS9vT6et+yggq9mUvb+p/vYacyP+d/raGxZn3lZlsE5jl0AOfSmEsT TowBdm1sA7XkVYK73BdWnV0zS4+ahxnZhJsMFPXyaGojqK0ZsiJQzHIPzAK5SzcJdElZ ZfuiI9tzLpmV2xr6EGx7+f8dj8WtX+yrEmfQq8/vcVmGaDlCuCZu1qfBP8hFvxq/spIo gYpM9GrdxzNEnS5FL5ZU7Z1vxUu/VwwzcKeOmXbjKTKpKJJcYm9jUPhl4yI69fe6LjeP eA7SZD6hTPyJYvOUx/ON61sTbzGLA82adKWyNlZtkZeclmgWIiC5PY5VBmU7oGN2fYdV L0xQ== X-Gm-Message-State: AOJu0YxjgRS7Qhm7+mAkokCECGlvt1ENNJNeRGRYtl1bGaJAKwJaSnTr FHl/RyaDuFZenorVijGcA8CrkYvYEnjXhHtGbRgHICF6VmI2nBLNX5o1ghvF4WjcfEge0d28Wj4 NsQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:52c4:0:b0:61b:1225:dbd2 with SMTP id g187-20020a8152c4000000b0061b1225dbd2mr94872ywb.3.1713389683369; Wed, 17 Apr 2024 14:34:43 -0700 (PDT) Date: Wed, 17 Apr 2024 14:34:41 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240417153450.3608097-1-pbonzini@redhat.com> <20240417153450.3608097-6-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH 5/7] KVM: x86/mmu: Introduce kvm_tdp_map_page() to populate guest memory From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, isaku.yamahata@intel.com, xiaoyao.li@intel.com, binbin.wu@linux.intel.com, rick.p.edgecombe@intel.com Content-Type: text/plain; charset="us-ascii" On Wed, Apr 17, 2024, Sean Christopherson wrote: > On Wed, Apr 17, 2024, Paolo Bonzini wrote: > > + case RET_PF_EMULATE: > > + return -EINVAL; Almost forgot. EINVAL on emulation is weird. I don't know that any return code is going to be "good", but I think just about anything is better than EINVAL, e.g. arguably this could be -EBUSY since retrying after creating a memslot would succeed.