Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp258976lqi; Wed, 6 Mar 2024 16:54:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCBl6aXnT6DWsy+brjRyNLtq+vp+o8SM/ypPtQcE2k68YLL2j+/vpnLaX3dSSETdmvJd6TJabZUVljHNLHducrAasRawsEvs4INIBImw== X-Google-Smtp-Source: AGHT+IEwyI+DglAvSKd30G5H2MLlrLDdChjLS4kybEY2Rh61XxJuh/0P41FbD1ad90k71buZarDx X-Received: by 2002:a17:90a:dd93:b0:29a:7579:88bc with SMTP id l19-20020a17090add9300b0029a757988bcmr13418962pjv.46.1709772849526; Wed, 06 Mar 2024 16:54:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709772849; cv=pass; d=google.com; s=arc-20160816; b=ZyUdJCaMT5HUIPSCI6Ea4kl5yW3T3TBsg0Rxhurf7dAw0q1fh5EvaksCaz/GFAHAvU c32YEXrZUA5EYAXkB38GTbNC5OcyT2S4reN1IePxBoKeknjijoy9sUkOWr/rlHHx+U72 60lZc0JNdi/2x+83jVcuggEY2RGtHDgLMbhP+G/6Nax7M9Mn41eb/nqQbbSd4Icyn2J4 qCLMIbdoLjrvXXdk6sOqB1A2lqBf0qJSwMvCTMoi/hUt6huZfCX1qTH/axou9hvwo3SD dEh8NB7AB9Xr62frdHw73V3+raDXfPbfr3whzZh6VFc2nzRLiWbzEmSjovHe+jA3ptlQ fq5A== 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=13JM4dn5oLawZvcGqOUh0FKLknmM5OO13+s6TUK67SM=; fh=guPAseh0p/1e/O5Hv53CRvO0dVnEYBNSbV8CfQsgABo=; b=IgWofgEtF/I/sRfzQrtqJHnP0F9yLI8Ezv2epVrEVcUYM0GXYj5c+/qyZCi510xl/g 9IcNJlH4JCDlhUzxSoPea9dglq2fHQ7YjNyg6TSm0/S0Po03dOzi5xARgcDDNbSyLefK ZhhCkWoq/6AUKJRO4lxIFoxlSL1KSFkqcOrIyUmjc/uRQupvQHtDeu+2B08Z69OcoZ78 j7iR5mOpFwgPoYLpS7m0RvBH8YfPbWxD0YHbZImlXrAYUF2RwGZ3lCTBIs1LwuTOD8Wo sqPlLIo9B/kSUcxEwLtGQSH7o5LKHQ8KjPEZ7dwarIQ6xgvB5krp8gQoaN1L1kYWdLBY RZdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="qYL/uWqR"; 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-94796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94796-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c62-20020a17090a494400b0029a6f31b103si590887pjh.153.2024.03.06.16.54.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 16:54:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="qYL/uWqR"; 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-94796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94796-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1AC29B2389A for ; Thu, 7 Mar 2024 00:54:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBB4D4C89; Thu, 7 Mar 2024 00:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qYL/uWqR" Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.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 AE00E1859 for ; Thu, 7 Mar 2024 00:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709772828; cv=none; b=oBP7ewrGT2vf+q4mN8Yvp/RhxSUaqecSLr2kaW1DmSC5JmA1DZH8gb9/ESHqAUXXCNa7HedJjAn60d37OJ6vNH+D4mqRQMVNhbtncNlAg36imAttCWsjYcAPh16UZWe0gDuJNt9ziCZdLzvqb03P1LNeki25MIgN6IrI9sv/ocI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709772828; c=relaxed/simple; bh=5a/K4Sl1FUS7oq60ekNERF2iXFSv3DJI7QNsBj3/nFc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=i10j2DsoFQsiGebxOjfVtm70pq6AdvCS35NGbNzA756SLIxJi+CYEQlLTShoDDeCun65IfDoDoLleAdgcZEEJTrXhZoGkCjf/CYfaYADhNz6cRBE9sMtA9WVIJO2uWiM13A+ZMYCSi3GQn0PDHgmvObUgm/QdXGF0Fp96dkWZSY= 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=qYL/uWqR; arc=none smtp.client-ip=209.85.215.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-pg1-f202.google.com with SMTP id 41be03b00d2f7-5dc90074016so284125a12.0 for ; Wed, 06 Mar 2024 16:53:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709772826; x=1710377626; 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=13JM4dn5oLawZvcGqOUh0FKLknmM5OO13+s6TUK67SM=; b=qYL/uWqRYfRXAJCaIezmM3j9JaQzznvy1x4cB/7jYWaQM/h/yWFYb8rs31WNLR2ctW QHl0RR/XxPo8It0EGAZwBUlzkrZNW3nJD4A/2ffQyz1496f1UPjP5cloclVw37uEh8tW e/rTbTn4ngCckwNj/h99lw4qKAkZbjmGmqiXDMUrh60ScTeD5E+7Ndow1dxzuje7J9ob WDBTWnwdVlpXYmw2vTQEI2GN22lEV1X7yyibD0CiwvubtAF/LdCW5cRswK/DhR9A2hjR +65vy4E3ZM32hNQaeN8riR57P4M/0K5lfrhZbN/jqTUjaX77mba+CtCfHJWewMR9ov5T SzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709772826; x=1710377626; 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=13JM4dn5oLawZvcGqOUh0FKLknmM5OO13+s6TUK67SM=; b=mWTkhUZ19zqPwqWoyxfGO8NamarkgYwIwP6rxFz+JT4lec5M+FpUgK//nb7baiw8Dx Q6UiIvoI0f/auufDj++5xeQkn0vIOw/r/zTh60/04oJiPya9ftXk2pOK82D+zJabytIt rL6sS69yt1V/wCeToMpGhmoRXxvE5iub+wBXqzDTtAuru1q9eFFIHg4uu9bDFYlu0LLb I2CbErBP2BjVgFOTYMHNv3/sn5tLRo72nIhOkx0HETkyuT6DUKyEvo9ip6i9PwDSQc8D 8nPq3Tuw7nWqkhuFE+HctDwIpFrnLQvAlgabJgkJOIGJem4RIqUlbtnIoV5lLQmNcmaC D0Kw== X-Forwarded-Encrypted: i=1; AJvYcCU3gbo2LFMtjyGItxZjKqJJA8oxrW5vkS3y7O9SirFrIKNvF3J/H/oCGND0zOBku6AWyKVRsKoS8MhliXkQQvhVFLGuWcWNCpArQJy7 X-Gm-Message-State: AOJu0YyX2xp58sPv4pMZd8iJBocD+8FjEHGjhbUi2+fgUes3vTH6rbjf oWfZVlxT/+pAomnDjOPD0a7SnUewK+0Bze/PWglcTj3wxEHbE77vianOxxv+ncjbOja0H2jqox6 g4Q== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a02:b8b:b0:5e4:5fba:17e with SMTP id dh11-20020a056a020b8b00b005e45fba017emr42501pgb.4.1709772825909; Wed, 06 Mar 2024 16:53:45 -0800 (PST) Date: Wed, 6 Mar 2024 16:53:43 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240228024147.41573-1-seanjc@google.com> <20240228024147.41573-14-seanjc@google.com> Message-ID: Subject: Re: [PATCH 13/16] KVM: x86/mmu: Handle no-slot faults at the beginning of kvm_faultin_pfn() From: Sean Christopherson To: Kai Huang Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yan Zhao , Isaku Yamahata , Michael Roth , Yu Zhang , Chao Peng , Fuad Tabba , David Matlack Content-Type: text/plain; charset="us-ascii" On Thu, Mar 07, 2024, Kai Huang wrote: > > > On 28/02/2024 3:41 pm, Sean Christopherson wrote: > > --- a/arch/x86/kvm/mmu/mmu_internal.h > > +++ b/arch/x86/kvm/mmu/mmu_internal.h > > @@ -235,7 +235,7 @@ struct kvm_page_fault { > > /* The memslot containing gfn. May be NULL. */ > > struct kvm_memory_slot *slot; > > - /* Outputs of kvm_faultin_pfn. */ > > + /* Outputs of kvm_faultin_pfn. */ > > unsigned long mmu_seq; > > kvm_pfn_t pfn; > > hva_t hva; > > ... how about get rid of this non-related fix? Eww, yeah, I'll drop it. I originally had code that made the outputs valid if and only if @slot was non-null, and had updated the comment accordingly, but ended up going a different route and cleaned up the comment a little too well :-)