Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp961970lko; Tue, 13 Jul 2021 14:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZGLRoEEY74FeH9vHPDpyXI9++X69R7wBPEwiewt2Ew0l9jctCd3GfrzUBB/jPRV5JAAam X-Received: by 2002:a05:6e02:1010:: with SMTP id n16mr4392310ilj.146.1626210004069; Tue, 13 Jul 2021 14:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626210004; cv=none; d=google.com; s=arc-20160816; b=XWCs7w50UG23TxiSN7Zax+5GQXECjJ7/6I4kdRdqy76lqmdeKhdJJ+zljFWKXu6wFC PWW+9GxvrTgRB9w9VYCqFIpNGC6ggz5Wlc3gUNt/gNZBymHTLj+JVS7qa8kTpJ5hbv12 9wnqX5KZ+N+1Advc/71+FXNzogDDiPudPDXnCtEvkjd1ioLFpuz1i0LDZKZ0TOxCEvPx Dfp51q4brOVKY0Q/DwCQCOCnzIXsksoaBlNUCiCyJiYQU7zONwDq1Mg8ShxGpof6W8VT hvxPmJ+aTzYzurzofUQs6LF9x7yGjSD6xu4Kw0M7C0Gl603t/+TfwjSrJ6Gk2rGhegNV wjGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1DqW0KvhYSIK42zC7O5KI/TTNeM/zzYloShAYV2CzpE=; b=sBQb8vyr+byDynKan1NhgAusNhU/w+MciYlVwmbzy+sOlbqFB0k1J8LaCpFxiuuZVW zOGbS6jZLka/uIHFltIHeHg6ILcha+ANJawANy6RdVAYHgsnV3XwKfv8fabtnUisqS3Q 9HL6o4kJ/cPV9CH6SmtOyzaTswglvyuBUMth6OZLz1BKFwq+4W0jnYR48gHkwHCpRpRp gqdhsq29uicpBzRbOPAR9KgInTDE6+RJ1HN29wZ4smFq9B8uDofsvSo/3GJmA7oc5qmX Wgcrn7UsmufVJAA8biJ6TRoahiyrmQ+rdRpgcMnAm3xM/ZCBAnj3vyIXCmbC94HdyHX6 lJiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=eWyy0jdd; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si12821147ilm.115.2021.07.13.13.59.46; Tue, 13 Jul 2021 14:00:04 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=eWyy0jdd; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235753AbhGMVAu (ORCPT + 99 others); Tue, 13 Jul 2021 17:00:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235716AbhGMVAs (ORCPT ); Tue, 13 Jul 2021 17:00:48 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44418C0613EE for ; Tue, 13 Jul 2021 13:57:58 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id g4-20020a17090ace84b029017554809f35so2056615pju.5 for ; Tue, 13 Jul 2021 13:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1DqW0KvhYSIK42zC7O5KI/TTNeM/zzYloShAYV2CzpE=; b=eWyy0jddXtN29MpB2D2HVwuG3z4IKomgwIsIgLyaih5fTxUChd13N0JRqGOH80TUV+ WtqjwGggJAMvnUEwcpeOUkWoICip1CFGD6LSbIFPQ+wQDcOTBSZGeJgdu0so8TLAuQCw oHmKKJAgNUnMBXm4STr7NZLHun8HTh6onEXkPPMIj1AZVA3wPrmK32lV7O5UckRUb1XD AtVCkzcbSJxZBStCGdGEtsIi7kZkgRq/EyKjVjlA+ASpzY3kMPEyHObTlEUF1UhOXWC1 Dpc6t6V9iaEwfyb6IENuWGS/42LpLBpiqEfkPie3xpwF0fn/zPrKcoUu3w/T0kVE/AmE NouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1DqW0KvhYSIK42zC7O5KI/TTNeM/zzYloShAYV2CzpE=; b=h6/GJXdLxa7ppgub9mRLiQNAnL02rvQuALIiC+M7ZSwjwHLAafRLeqMv1OQScLAUo1 A47Fs8H8NzMe/EjRRz+IWgbxo18lSqT+Mx26GcCZplDt8w5PTB+Vgl7dk5VHjh8kplxR ubBeLXz8bSrLsGBLOUl0EpCVfh/njep7eISd8O/fLpP9BTh00Cv/z6f8taELXO+u6MAI Pt1xcx8mBVqXfXxmrO37aOyutW7HpvK5+WLTRg5ya0uET5VKr+QiNZtELHhRN2vEVbWE qZ1JAO+1Ya4JU9iOOOo/XKwMr2ZlL26NAsp36HDeLTe4Brln3RxyF5pKOjziVaAzF/0A Ed5Q== X-Gm-Message-State: AOAM532flJIq5fRCicyQqPc4WYCnCgGsYJkY7iUu8VWFweCS2+O/FbC/ MTlBg41cPyf2Y7eDwPsb7zBREg== X-Received: by 2002:a17:902:8ec4:b029:129:7649:87b7 with SMTP id x4-20020a1709028ec4b0290129764987b7mr4881431plo.23.1626209877658; Tue, 13 Jul 2021 13:57:57 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id m24sm6619pgv.24.2021.07.13.13.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 13:57:57 -0700 (PDT) Date: Tue, 13 Jul 2021 20:57:53 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: isaku.yamahata@intel.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, isaku.yamahata@gmail.com, Sean Christopherson Subject: Re: [RFC PATCH v2 52/69] KVM: VMX: Split out guts of EPT violation to common/exposed function Message-ID: References: <8e246d479e8986172d19704ef4ef4d2b666d5ac1.1625186503.git.isaku.yamahata@intel.com> <6e129879-bb76-622e-19a9-afb62fcf864b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e129879-bb76-622e-19a9-afb62fcf864b@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 06, 2021, Paolo Bonzini wrote: > On 03/07/21 00:04, isaku.yamahata@intel.com wrote: > > +static inline int __vmx_handle_ept_violation(struct kvm_vcpu *vcpu, gpa_t gpa, > > + unsigned long exit_qualification) > > +{ ... > > +} > > + ... > > @@ -5379,7 +5356,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) > > if (unlikely(allow_smaller_maxphyaddr && kvm_vcpu_is_illegal_gpa(vcpu, gpa))) > > return kvm_emulate_instruction(vcpu, 0); > > - return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0); > > + return __vmx_handle_ept_violation(vcpu, gpa, exit_qualification); > > } > > static int handle_ept_misconfig(struct kvm_vcpu *vcpu) > > > > This should be in main.c, not in a header (and named > __vt_handle_ept_qualification). Yar, though I'm guessing you meant __vt_handle_ept_violation?