Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1356503ybf; Thu, 27 Feb 2020 09:24:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxLtB1k38eOOODr/RgavBZnVDAi0q8p5LgsipT3D5+wiUTrmpOppCfNKI9v8ai9WyszC3QK X-Received: by 2002:a05:6808:350:: with SMTP id j16mr77300oie.168.1582824255717; Thu, 27 Feb 2020 09:24:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582824255; cv=none; d=google.com; s=arc-20160816; b=fDTUbTpUWL+JMtF91RVBh6w2lCNgkXgOHu0iVKWKVWUrnwtQKIs4FEjOKWWY1o9/cx 53Diw/yOtZj56HarRgA9l+8+j/E2ScE311MsGPw2X3LSuage09S4Tlcog/z8IuQjsXNO Q6GnxRAh4cx+2d/yYL10wIPsWGpAAEPP8Oapa2LwBZ32pPcogUE+7+HJgcqSZyJFy5E4 xsmx1IPlHZm6qSE2CdpfRF850FqfLL1TqIRYVDBkXKIjbGhB+3mLtzI0+WnFXXcNo9Pi EUc8rg1TSnXfQB6YVKbXxwrg375X324tdRnDg+fHpsPOdIW9zbB1pyWVgkdWqJBJYR/J vHZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SlDjxm+2B5grDvGMES0JlUQIqTF3CpfqhZ7QZEVAnzs=; b=mkeFfg/zBO644NprAU0uXqDKAPECQsfYquIAnIHOHhO+zSVqehhJoMmee/h+fW6im5 VR4zunpKiftgxuFDD5YuCLwVCiGLg9ubNIx8ftFIHbOWZqz+Q/QeeEIPMiYFVKIc1xhx e4gL0OziYWh53ARaDnFiyTZF7bRrkwkya0Eh/APjtZiLoncTLTTRpt9DTUdIgbfUaiM1 LeMXbfWbuqJuUE+WfDBWbALJrr5hfrh8j0LPEFBXIf72Dtescc/6u0pZ2sDWP2Wbzhrl T6pSTRDf3zv3Zbg75OgSNtZ7QHj5hcowiGopl2YfAf528xplSi1FPMRtBdyHNsQJWCqQ pe2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iy13O7LA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j25si216216oij.242.2020.02.27.09.24.03; Thu, 27 Feb 2020 09:24:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iy13O7LA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730367AbgB0RXt (ORCPT + 99 others); Thu, 27 Feb 2020 12:23:49 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54469 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730314AbgB0RXs (ORCPT ); Thu, 27 Feb 2020 12:23:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582824227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlDjxm+2B5grDvGMES0JlUQIqTF3CpfqhZ7QZEVAnzs=; b=iy13O7LA5C3mcxLNPt+8KuzK7LpddD/P964NhMQpB9Syln/7H2btkCCYIwxOcz1tCl1See q0EPIBh9aM+fhJOXl2Y4I+U8p+I5ay3KlGk65KJQGrHWAtgY+8RQXiTj80YmkHTOOisxdr n6SIVq2vms/gkN/42X5LsJ6eYWZ9usE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-395-Ep8BXDX_MNi_g4ftkKwDLQ-1; Thu, 27 Feb 2020 12:23:45 -0500 X-MC-Unique: Ep8BXDX_MNi_g4ftkKwDLQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 392EF13F5; Thu, 27 Feb 2020 17:23:44 +0000 (UTC) Received: from millenium-falcon.redhat.com (unknown [10.36.118.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46D02101D48A; Thu, 27 Feb 2020 17:23:41 +0000 (UTC) From: Mohammed Gamal To: kvm@vger.kernel.org, pbonzini@redhat.com Cc: sean.j.christopherson@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, linux-kernel@vger.kernel.org, Mohammed Gamal Subject: [PATCH 4/5] KVM: x86: mmu: Move translate_gpa() to mmu.c Date: Thu, 27 Feb 2020 19:23:05 +0200 Message-Id: <20200227172306.21426-5-mgamal@redhat.com> In-Reply-To: <20200227172306.21426-1-mgamal@redhat.com> References: <20200227172306.21426-1-mgamal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Also no point of it being inline since it's always called through function pointers. So remove that. Signed-off-by: Mohammed Gamal --- arch/x86/include/asm/kvm_host.h | 6 ------ arch/x86/kvm/mmu/mmu.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_h= ost.h index 98959e8cd448..683663b437e6 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1515,12 +1515,6 @@ void kvm_mmu_new_cr3(struct kvm_vcpu *vcpu, gpa_t = new_cr3, bool skip_tlb_flush); void kvm_enable_tdp(void); void kvm_disable_tdp(void); =20 -static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 = access, - struct x86_exception *exception) -{ - return gpa; -} - static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) { struct page *page =3D pfn_to_page(shadow_page >> PAGE_SHIFT); diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 87e9ba27ada1..099643edfdeb 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -520,6 +520,12 @@ static bool check_mmio_spte(struct kvm_vcpu *vcpu, u= 64 spte) return likely(kvm_gen =3D=3D spte_gen); } =20 +static gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access, + struct x86_exception *exception) +{ + return gpa; +} + /* * Sets the shadow PTE masks used by the MMU. * --=20 2.21.1