Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp729615lqb; Wed, 17 Apr 2024 09:06:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGomal5ChsqttN8wErKLSI7SXMah7/p3f0NVOhxykGBP0ucE9I2BOqXnmynHTSZZekPPvh2VmUxRXnrb92BF+IXhK0verQnsy9CiV3ww== X-Google-Smtp-Source: AGHT+IGChJmUeNasOIa4Wz8SGrc+tj9lLxyhtGw7mW1/tXE9AaNmeuXXnNRNj57bloJLOdcb/6xe X-Received: by 2002:a05:6a00:198f:b0:6ed:8aa9:4783 with SMTP id d15-20020a056a00198f00b006ed8aa94783mr18528375pfl.13.1713370008160; Wed, 17 Apr 2024 09:06:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713370008; cv=pass; d=google.com; s=arc-20160816; b=sAN9n9ElXgtGq1SOLXGAUuqu2kUGWlOLpAhP8GYeVYYwpxiOPnYMwMSqdI9EKXDSDX nqyK73Pp/3FaU/MCrklFmKw63EDk22Qanb3k+b5SWgklxIzQZpmIsVDNqSo7J25cbXie YA/wt6DebjpCr138LCh3l+sLCLBXdirjs7Ww8AqOioe32nhS2srtE3zpne2S4xmL9ZHa WG7KcPpecYLpP7PaygSfka88iBkvJ5nnfPChYNexD3AhEZ6AJdKIM9FYk+GKSJ3IOpu8 p76R20/PCGr232yzsn4n5d7e1VlZ1cZ+WLgYzEcqRpW81KcjG8T2RTjG5DYxxN649NrT WzuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=dzERyazOZhZDFp//yk13CO/EeXSCUMQ4vzlhZ6tsJ4s=; fh=BbhiuZhWgiB6mzTXLfUS9BcbAgrcno9XGhxBVT1x0oQ=; b=uuPoxsmhsTNy6j7PFzyRojdgUGDtbWzah/eXSKVzSqxE0BcDgOx80888y/xHG4pTDn yJz1arEOPLVhHQu9jN2WXIy9a77eEHu0G9OzY7oVB0GKb2SMqkqgiILhlKNORYv/ubN2 ht9QDMR5DH3vtyGiuAoI5yZY3HZugIEwt0TbZlowT+Vy3ntqR4khMTvbWD1jWnFiYPTg I7Gwa+xee8KWPBifXbURbcowNYrk8YdraJQjpdw8/y12r96lto8Kgd4Y+tEZYeqpeskW uC09HtI4Tx3ET1c+dHunGbKOYWQvfJ+NuLCCvB+zSXcwTqbLUygWihUPF4BR33klMYih /S1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WZ0JJtC2; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-148840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u5-20020aa78485000000b006ed21ce7c39si11775466pfn.251.2024.04.17.09.06.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 09:06:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WZ0JJtC2; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-148840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CF42FB23D50 for ; Wed, 17 Apr 2024 15:42:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5F351482E0; Wed, 17 Apr 2024 15:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WZ0JJtC2" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A20E91411CF for ; Wed, 17 Apr 2024 15:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713368533; cv=none; b=FgEQo+ZZh+rchTIzdZkkU6A6saL681Qdu1BmCUz7b8/LujJJ1yVwxN5pifU62KI7WfzAUylfoT6YNj0ceeZH6mXANxc4aTldXsbcoMSr/YEYzqBiWCO1sTBp9561218pp45x8tVsoBsx8Dogunt7dZDCqukZTcgljt8n1D7qL6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713368533; c=relaxed/simple; bh=7gVkTYWNNgR6Ee0qa0UmIW+l7/HdkMilyXO4kdChYvw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jORn3VydLgF6jA/rVI/yIZAK8MjqW23IhMYp/n3H259l8JBf/5fmA4vb4zcyEfW7CreXWBva8cDGxWyjKA4FEAxjDt4fnOjUvptkViQ+dO7y1u2GxHEBDn45NfJGa7jWuMOnW4y4uYTf2+V+mwtM6XiZdsbF2pOr0mtxEfj6nHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WZ0JJtC2; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713368530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dzERyazOZhZDFp//yk13CO/EeXSCUMQ4vzlhZ6tsJ4s=; b=WZ0JJtC2UgMV8K0Jqiqb0DOi3ikMRg0E9mxrN5LKh4CnfBdSOUkisFgUc2bg3XIqwgy0Mu pEnBBOf6zN3oQ9qVlhG+qIl9zLiiiOoU4HwUXClogw1eaA1IqVZw1dEiTNw/WAME92wjl/ Nv8O/8dVI/Vwk4zAMP0iT6xqDcA2P78= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-tdWWWZMAOg-zqL0m4MHnCg-1; Wed, 17 Apr 2024 11:42:09 -0400 X-MC-Unique: tdWWWZMAOg-zqL0m4MHnCg-1 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-5ce67a3f275so4113887a12.0 for ; Wed, 17 Apr 2024 08:42:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713368528; x=1713973328; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dzERyazOZhZDFp//yk13CO/EeXSCUMQ4vzlhZ6tsJ4s=; b=dGOdZ7pHwyNiCOAzZvwKXbX6woTUfKwkGtcuLWLJEZ/aYHN+UZOlWalmp9pHS/S0gU leK6lCjn1k2KCr+Sb1JHxBdZJd/4JeYybNmRqTrT+/9u41Fr9QQczbTq6zcGVAJJ8WcI LKIkFnS3Yp0+5lqWfMz/R4qjWzDXpnuzkLBPNtqgZjS9lKvg91MwgtLByHB+BlrNJ6jx ZOoHT+/jgDIbpkNOsPTL56Rb8HdLS9UixLDK720ILS3wfs08eHjuDpJCUK5TwwpS8GtP 38DYaxp5Szt9F6nCb+eUc+nTppYReBUWs/7/W6fuQGAfG7e4PFOWfQfrb5SryLQTDyRs WEtA== X-Forwarded-Encrypted: i=1; AJvYcCWxGSJ+KHzemz2i1+s0MSHe5DX7eM/5ewX67RCUSsGf8mWfPGS0KUKXP58YS7jQZLCs6sECzBKD4xIVL8qf0ltJb5lVH4CCO9/3uxlC X-Gm-Message-State: AOJu0YwIzcXVles1rKyPjyo5DW5bxOFNQQR4Ie2iRBU8WJrTIO854vEs 4jAOe54jWPHlLxbwbIe5HChxXaxnU76fJ/7fP330Xu58EfiyaoSTrHB+6NTFcZpORVXRZdmKT7P 9XKDpj8+CbGvNIX37u5grWnYmEA64wmZRhtmeJzA63gb/rcHMaZs5yFwjFxJXiquEdddmafHnZo 3gOx5cNW/3Zr2c49or9SoO/iZMjoarmjGTtcE1 X-Received: by 2002:a05:6a21:8802:b0:1a7:4a6f:ec4b with SMTP id ta2-20020a056a21880200b001a74a6fec4bmr17428750pzc.35.1713368528175; Wed, 17 Apr 2024 08:42:08 -0700 (PDT) X-Received: by 2002:a05:6a21:8802:b0:1a7:4a6f:ec4b with SMTP id ta2-20020a056a21880200b001a74a6fec4bmr17428721pzc.35.1713368527850; Wed, 17 Apr 2024 08:42:07 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <621c260399a05338ba6d034e275e19714ad3665c.camel@intel.com> <20240416235230.GB3039520@ls.amr.corp.intel.com> In-Reply-To: <20240416235230.GB3039520@ls.amr.corp.intel.com> From: Paolo Bonzini Date: Wed, 17 Apr 2024 17:41:55 +0200 Message-ID: Subject: Re: [PATCH v2 03/10] KVM: x86/mmu: Extract __kvm_mmu_do_page_fault() To: Isaku Yamahata Cc: "Edgecombe, Rick P" , "kvm@vger.kernel.org" , "seanjc@google.com" , "Huang, Kai" , "federico.parola@polito.it" , "linux-kernel@vger.kernel.org" , "isaku.yamahata@gmail.com" , "dmatlack@google.com" , "michael.roth@amd.com" , isaku.yamahata@linux.intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 17, 2024 at 1:52=E2=80=AFAM Isaku Yamahata wrote: > As Chao pointed out, this patch is unnecessary. I'll use > kvm_mmu_do_page_fault() directly with updating vcpu->stat. Actually I prefer to have this patch. pf_* stats do not make sense for pre-population, and updating them confuses things because pre-population (outside TDX) has the purpose of avoiding page faults. Paolo