Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1399905pxk; Fri, 25 Sep 2020 13:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVnPYZRaFbeTbSuRZshxB7BFXRJe8QbCAJqctqktoP11rq5NceuP7qg4lblEZMAhB4a5Tb X-Received: by 2002:a17:906:4bc4:: with SMTP id x4mr4737754ejv.240.1601066988640; Fri, 25 Sep 2020 13:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601066988; cv=none; d=google.com; s=arc-20160816; b=CrupXgqf1ABkp9fTVhr5A4p7fTD0EYCsHUI9saOAbdGGlMuZDIDk6NQmCqUW8uTVrK x/n5Ei/fpSedJa/KgyJ9JLYPsFRGx6mPku5lZPL4owYK4RMpgiFrrv5Z+C/JlCfiHozm ChY/7RH1Gc9QCOx9l2jqnDzamk4L6+46xn2iUHCqypEYgO10Y2USTuP43CHIJxzR+k26 zD2wLz6jVwf/hX0IfOuQ7aRkKGFM0l5wKYgLIIHqCYw8fqeFgkTLaQ2aHH8lciJCcPII QuZBbEWVWfK7oxqDaKhcdVqpFhEJIFc0FwGhDBqBkZ7LBqfhHuxo7zpP/R0HMTGxDuA/ 9eGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=4UMfAk+Ig0LXR2tmGUUFtuxFjBEVBaufuO/YZ7aJ32k=; b=tf/9F7DYIUIWoXXWeRJyMT72jKeOJKixMZcOhUfpSG+rHnJc+12q9euJWTntZIH5JH stJqBl42lyYH844Vod6l4aoiHw/ZyEeVWCVo0XsD0NWQxazZE9hrXgxJi5oihuIP062x qZ/alotLxY8YkBauAGpnJKYu1izR3WtOigptYi/n3lnO+9AhKJ4ta+HGVHWCWSQaJ4dt u35mmVf5mT7EOB3QYbmDggcYhsb+H/vsWDnV9LFYNIU93V9LAmLeD8sGKOjyRAX0m/s3 6DWJ/QovhSCW6DkWQS94hPlR6GPeh5QzziH3TR0EGFREwMhhPEUGcAQZ1pwl1c1+9U5Q uyvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc4si2606102ejb.526.2020.09.25.13.49.25; Fri, 25 Sep 2020 13:49:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729145AbgIYUpe (ORCPT + 99 others); Fri, 25 Sep 2020 16:45:34 -0400 Received: from mga05.intel.com ([192.55.52.43]:41395 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbgIYUpW (ORCPT ); Fri, 25 Sep 2020 16:45:22 -0400 IronPort-SDR: j8QfebcWgvtS6F9AUQwdW3ZqscOtdUE5k7FJki9beL6f6ppqmuFEIkpwM2iX5FOAc33yyt1x8B vZpzNNAMnCMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="246421199" X-IronPort-AV: E=Sophos;i="5.77,303,1596524400"; d="scan'208";a="246421199" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 13:40:45 -0700 IronPort-SDR: vHGr7RoTrIepSSH5z9XxuBhD6pPC3ZYVQnUOhjOrh18IzRmdl0eOWsux+wkbWwRf+yO1y0TcrZ My54RI0QHqRw== X-IronPort-AV: E=Sophos;i="5.77,303,1596524400"; d="scan'208";a="292908495" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.160]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 13:40:44 -0700 Date: Fri, 25 Sep 2020 13:40:43 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Kai Huang Subject: Re: [PATCH 0/4] KVM: x86/mmu: Page fault handling cleanups Message-ID: <20200925204043.GH31528@linux.intel.com> References: <20200923220425.18402-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 10:38:02PM +0200, Paolo Bonzini wrote: > On 24/09/20 00:04, Sean Christopherson wrote: > > Cleanups for page fault handling that were encountered during early TDX > > enabling, but are worthwhile on their own. Specifically, patch 4 fixes an > > issue where KVM doesn't detect a spurious page fault (due to the fault > > being fixed by a different pCPU+vCPU) and does the full gamut of writing > > the SPTE, updating stats, and prefetching SPTEs. > > > > Sean Christopherson (4): > > KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALID > > KVM: x86/mmu: Invert RET_PF_* check when falling through to emulation > > KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed > > KVM: x86/mmu: Bail early from final #PF handling on spurious faults > > > > arch/x86/kvm/mmu/mmu.c | 70 +++++++++++++++++++++------------- > > arch/x86/kvm/mmu/mmutrace.h | 13 +++---- > > arch/x86/kvm/mmu/paging_tmpl.h | 3 ++ > > 3 files changed, 52 insertions(+), 34 deletions(-) > > > > Queued, thanks. Looking at the KVM_BUG_ON now since patch 1 is somewhat > related. Ha, very prescient of you, that's actually a KVM_BUG_ON() in my "kitchen sink" combo of everything :-)