From patchwork Tue Aug 24 07:55:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jiangshan X-Patchwork-Id: 12455699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DBE2C4338F for ; Tue, 24 Aug 2021 17:59:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FD06610E6 for ; Tue, 24 Aug 2021 17:59:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241149AbhHXSAH (ORCPT ); Tue, 24 Aug 2021 14:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238831AbhHXSAB (ORCPT ); Tue, 24 Aug 2021 14:00:01 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49769C08EDA0; Tue, 24 Aug 2021 10:40:50 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id v123so4302221pfb.11; Tue, 24 Aug 2021 10:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CQW9zcD1iWohLL0SIYdT9vr926ih+mvgsdrlaiOGq68=; b=q7ttQLIoeG3ckkiRgxqEPJcPxTRSJalv5DEs23w1eyMvpLw+2d2AUxpeU+AXF1WbXh HbS8KcqUbr3vpNR+vEZAaGL4mQuO3OJcqlB+AEkZJFuJpJmz43W5OCx5h+B1HLdfxW62 YQEwq5ehFTcu/HkZblC+HndnVmad46B8acxo+fFVvdAjMaSgpe6hKrWzC7xNzRhWpfPf 91sUZYkBCRitRylF2cAZbuAVxvEI5P4fOMaXs9El8fbWhlVYz9lX+CKPZaBFOkNB15Wc 9jiy2ohaWcPoeXpBIL9TnGgBwhSrV/4JNr3TZZWk7bXRIrQCD/21uzzra9JI6jgw81d6 sqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CQW9zcD1iWohLL0SIYdT9vr926ih+mvgsdrlaiOGq68=; b=GlSWLF6x5Rcy6rDWULjge93muiE3M8GsO4//94HSEYrNXYcb06JG6RGnakra8eL+B7 41g/ifmV960mtN7lUEPQHpqQyCVnoxor76to9UgBsB+Rf7+N3gLNMxRHR/ETfZenGkRg TgslWUjvKPZRi/rie2Me3YovV0ObRECYtHjAPYR1hBxV5r0nxr5uT5/8HP5r6yw0ssjJ T+wf+yPJPoS6vw8oN6LJtcOZcBs7Dxwt09OtkolnWK3gOQEE/zKvuSYgHupQZioO5uLU lgC39/CJnRE5yiSCndLnf+zB++R9Xn0f6Nduv+OPmHrVqV9T49VdGZ6ZFjdMoxGIVP3d Xkvw== X-Gm-Message-State: AOAM531YpvDbcy1LjjzTYJznosSixtYPO9tVoYGXbgTiD36/P4kIJoXm cw3MvWuhL5PMV8dNhrIn2ctVPtL+zwI= X-Google-Smtp-Source: ABdhPJzdmTsFFwkdj6b9umV4aZli6sfawea+gfCCbWcIBSHLZiJmFwuZn4MXZg1uwWwWAwDC8kYB7g== X-Received: by 2002:a63:144f:: with SMTP id 15mr20866714pgu.46.1629826849708; Tue, 24 Aug 2021 10:40:49 -0700 (PDT) Received: from localhost ([47.251.4.198]) by smtp.gmail.com with ESMTPSA id o16sm8920397pgv.29.2021.08.24.10.40.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Aug 2021 10:40:49 -0700 (PDT) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Lai Jiangshan , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org Subject: [PATCH 4/7] KVM: X86: Remove FNAME(update_pte) Date: Tue, 24 Aug 2021 15:55:20 +0800 Message-Id: <20210824075524.3354-5-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20210824075524.3354-1-jiangshanlai@gmail.com> References: <20210824075524.3354-1-jiangshanlai@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Lai Jiangshan Its solo caller is changed to use FNAME(prefetch_gpte) directly. Signed-off-by: Lai Jiangshan Reviewed-by: Maxim Levitsky --- arch/x86/kvm/mmu/paging_tmpl.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/x86/kvm/mmu/paging_tmpl.h b/arch/x86/kvm/mmu/paging_tmpl.h index 48c7fe1b2d50..6b2e248f2f4c 100644 --- a/arch/x86/kvm/mmu/paging_tmpl.h +++ b/arch/x86/kvm/mmu/paging_tmpl.h @@ -589,14 +589,6 @@ FNAME(prefetch_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, return true; } -static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, - u64 *spte, const void *pte) -{ - pt_element_t gpte = *(const pt_element_t *)pte; - - FNAME(prefetch_gpte)(vcpu, sp, spte, gpte, false); -} - static bool FNAME(gpte_changed)(struct kvm_vcpu *vcpu, struct guest_walker *gw, int level) { @@ -998,7 +990,7 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva, hpa_t root_hpa) sizeof(pt_element_t))) break; - FNAME(update_pte)(vcpu, sp, sptep, &gpte); + FNAME(prefetch_gpte)(vcpu, sp, sptep, gpte, false); } if (!is_shadow_present_pte(*sptep) || !sp->unsync_children)