Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3231611pxb; Tue, 20 Apr 2021 03:46:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe5TVea3Ep/uTsgwhRT6u0EJ4CKH4Vrpc+Y/+H1cdd3lOLdOI19xM2PvjNsP4izUcfJ+BO X-Received: by 2002:a50:e848:: with SMTP id k8mr31010941edn.179.1618915595586; Tue, 20 Apr 2021 03:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618915595; cv=none; d=google.com; s=arc-20160816; b=hXUj6UUyvAOG0LXXVQQMgyUq/eRox0qY1EtQtOVEyQyv9I8bAOU6EPJpNZsBPFOxbL 88dizYTam+yLj7nAaued6eg0pwAq24Ma0L9kh1tmkWsRW/Cmb0DHz+vA9MxM7Zfz/QXq VXmMI+PoIH9VTFMTUadsj3D45MvtkdfemXjZacOU8/H1vZBlgeBtts3rj+bTfd01E1lO 3EyajFg3sPAfr3lKfoghTLXK4I/VF4OxgOY99TZPRlzquBkD+LLysbbraafLh0ClWj/0 XQvMJVi5YohUP8plTuBovKM696QNBaPJUUuH0v22MZJeFFWMMp4z664Pakm97UAPziRI zs2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=KmQDxhpbnkfXZ7YHz6pe6GKuAMnQ+tvijp9iTwioJhg=; b=VNSPOMcYHQOqtMG1X6Uss1rZ7IO6K9+85net1+mDIdmrm+bcWTlOVzTWt//NX45Xgi bsVcgNeZRkxdWx+rTpMid2JDRp6PtkssW07/4Zsmwpl9ZC7JSqkjWLdngCKqSGMgBKH+ udH2PUa/RNh0SpyVfb5XuQr2l9C/0Ci+jcFaaeHsV2h7KWFIOe7TpqVcOLT3CC0BC7YT 56I7ntGSnnyT2Gq1vGupbdsakDiSFr6Co+SZhTFObbmIscmGVWy6k/6WlORU2WAEUr0e STtSuwvO5vovj5M4esJH+MQ8gY43BDhoU1nSztttgcy0gud+5tK2XZlKB2QsBJLbscXL 9feA== 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 di10si10223508edb.378.2021.04.20.03.46.12; Tue, 20 Apr 2021 03:46:35 -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 S231877AbhDTKnD (ORCPT + 99 others); Tue, 20 Apr 2021 06:43:03 -0400 Received: from mga17.intel.com ([192.55.52.151]:34983 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbhDTKmR (ORCPT ); Tue, 20 Apr 2021 06:42:17 -0400 IronPort-SDR: h3Kv0EleMmw23fIm+hj4ynT4Rwwnvh+SvnNXnRwO8V+kj2NGq4JZ6HrJq+ghFQjQV4MxmirCTZ 5nlah8fCVLmw== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="175590768" X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="175590768" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 03:41:45 -0700 IronPort-SDR: EeiCmqXixC7KxA1zVLISY0ltSE0IUkR07xAk2j3DlYPHqGQ8dNMUVNjv9GodX4FdBgQEPql7o9 4MfGPjYca4Iw== X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="426872789" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 03:41:45 -0700 From: Isaku Yamahata To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson Cc: isaku.yamahata@gmail.com, Isaku Yamahata Subject: [RFC PATCH 07/10] KVM: x86/mmu: make fast_page_fault() receive single argument Date: Tue, 20 Apr 2021 03:39:17 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert fast_page_fault() to receive single argument, struct kvm_page_fault instead of many arguments. No functional change is intended. Signed-off-by: Isaku Yamahata --- arch/x86/kvm/mmu/mmu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index a16e1b228ac2..ce48416380c3 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -3043,9 +3043,11 @@ static bool is_access_allowed(u32 fault_err_code, u64 spte) /* * Returns one of RET_PF_INVALID, RET_PF_FIXED or RET_PF_SPURIOUS. */ -static int fast_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, - u32 error_code) +static int fast_page_fault(struct kvm_page_fault *kpf) { + struct kvm_vcpu *vcpu = kpf->vcpu; + gpa_t cr2_or_gpa = kpf->cr2_or_gpa; + u32 error_code = kpf->error_code; struct kvm_shadow_walk_iterator iterator; struct kvm_mmu_page *sp; int ret = RET_PF_INVALID; @@ -3704,7 +3706,7 @@ static int direct_page_fault(struct kvm_page_fault *kpf) return RET_PF_EMULATE; if (!is_tdp_mmu_root(vcpu->kvm, vcpu->arch.mmu->root_hpa)) { - r = fast_page_fault(vcpu, gpa, error_code); + r = fast_page_fault(kpf); if (r != RET_PF_INVALID) return r; } -- 2.25.1