From patchwork Thu Oct 4 01:48:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 10625459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBF7017E0 for ; Thu, 4 Oct 2018 01:48:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBA0828D81 for ; Thu, 4 Oct 2018 01:48:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFC4728DD0; Thu, 4 Oct 2018 01:48:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 451A028DB6 for ; Thu, 4 Oct 2018 01:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbeJDIjd (ORCPT ); Thu, 4 Oct 2018 04:39:33 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45595 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbeJDIjd (ORCPT ); Thu, 4 Oct 2018 04:39:33 -0400 Received: by mail-pg1-f193.google.com with SMTP id t70-v6so2350546pgd.12 for ; Wed, 03 Oct 2018 18:48:36 -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; bh=oAMsVMJ5ojuElRAFO8g2k9+F8n7UAtFkG7Q8nRVaYlA=; b=CT+az2sPyH/pFmatuie9q4pISaS5zTWQ+bGcKGhTtGfnI6K/o7GHyKvD2ZEzxeM3aN IkBXHpYiO4rA1fvqeEJgaAjuDnJPw/0QHyn/w8Ct3PUwNwH2u1Nm/7TsApozdysnGw1y 1cW74+7gmg4eY1yS4D6xiDJrna0lkxJhZasyOsMZhhiQoP7vFfAWtSOQGF1pcYrRMIYH 3v47DNze1X7/3YBOT+3N0lZTphNGXJhogq3emGX1/HWY7pY5MCWSRCXslvorfgWWj8sd OTsrubgSOlVB/2FdI8khSo8xRUYveOZj9SBi4wroAWWtOysvnfrZxSEaDD19fGSQL/jn kR0w== 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; bh=oAMsVMJ5ojuElRAFO8g2k9+F8n7UAtFkG7Q8nRVaYlA=; b=lGFZVPXuc8GWFbEwoKiUYn7b3Whspfi9qHzC15fLG4tTVRlRJjtmNIyciB8R6M0VR4 /SGplYaD3VgmzCP+E4xg+F79fsTcTgU5Rod6wrtl15Wm7gZ/NhM+SHdcfV+ofuBG62Ms H9qq5OmTX2po8UNHa+1Prda8zdxfWRfKVPWG/QnDmbgUpVMgun+oYIv9Vsb/+2E3j2/P Q6N3BtUk33ZruknVz1WaTOma/MfLx6/ggRUuMUe5+nih3Ek6zegfrf041hnzuD3Bjf8j ZYEVZA0PrIMWcwX/fwGkh/QtmhwK4U264aq/xsEJV5aHWXPZxZgTzqBcV/hOYWzjin5f KqLA== X-Gm-Message-State: ABuFfojJqBFGlQekqemF8g/ju9ZfqDXQdh4enusrTBdStt0gXM17WfCV vtWtn7U+O07sDyw9+0HADhE= X-Google-Smtp-Source: ACcGV63pClwNNPwIIWFJJiEtdLkINFfNiWIbJZjs61CULMWu68ZXbucpOWBCdUy512kFvMme33irYg== X-Received: by 2002:aa7:8598:: with SMTP id w24-v6mr4423684pfn.77.1538617715916; Wed, 03 Oct 2018 18:48:35 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id k71-v6sm3861045pge.44.2018.10.03.18.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 18:48:35 -0700 (PDT) From: Wei Yang To: pbonzini@redhat.com, rkrcmar@redhat.com Cc: x86@kernel.org, kvm@vger.kernel.org, Wei Yang Subject: [Patch v2 1/3] KVM: x86: rename pte_list_remove to __pte_list_remove Date: Thu, 4 Oct 2018 09:48:01 +0800 Message-Id: <20181004014803.94963-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20181004014803.94963-1-richard.weiyang@gmail.com> References: <20180926075853.28715-1-richard.weiyang@gmail.com> <20181004014803.94963-1-richard.weiyang@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a patch preparing for further change. Signed-off-by: Wei Yang --- arch/x86/kvm/mmu.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9dca99948e12..834b36737fa2 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1249,24 +1249,25 @@ pte_list_desc_remove_entry(struct kvm_rmap_head *rmap_head, mmu_free_pte_list_desc(desc); } -static void pte_list_remove(u64 *spte, struct kvm_rmap_head *rmap_head) +static void __pte_list_remove(u64 *spte, struct kvm_rmap_head *rmap_head) { struct pte_list_desc *desc; struct pte_list_desc *prev_desc; int i; if (!rmap_head->val) { - printk(KERN_ERR "pte_list_remove: %p 0->BUG\n", spte); + printk(KERN_ERR "__pte_list_remove: %p 0->BUG\n", spte); BUG(); } else if (!(rmap_head->val & 1)) { - rmap_printk("pte_list_remove: %p 1->0\n", spte); + rmap_printk("__pte_list_remove: %p 1->0\n", spte); if ((u64 *)rmap_head->val != spte) { - printk(KERN_ERR "pte_list_remove: %p 1->BUG\n", spte); + printk(KERN_ERR "__pte_list_remove: %p 1->BUG\n", + spte); BUG(); } rmap_head->val = 0; } else { - rmap_printk("pte_list_remove: %p many->many\n", spte); + rmap_printk("__pte_list_remove: %p many->many\n", spte); desc = (struct pte_list_desc *)(rmap_head->val & ~1ul); prev_desc = NULL; while (desc) { @@ -1280,7 +1281,7 @@ static void pte_list_remove(u64 *spte, struct kvm_rmap_head *rmap_head) prev_desc = desc; desc = desc->more; } - pr_err("pte_list_remove: %p many->many\n", spte); + pr_err("__pte_list_remove: %p many->many\n", spte); BUG(); } } @@ -1333,7 +1334,7 @@ static void rmap_remove(struct kvm *kvm, u64 *spte) sp = page_header(__pa(spte)); gfn = kvm_mmu_page_get_gfn(sp, spte - sp->spt); rmap_head = gfn_to_rmap(kvm, gfn, sp); - pte_list_remove(spte, rmap_head); + __pte_list_remove(spte, rmap_head); } /* @@ -1977,7 +1978,7 @@ static void mmu_page_add_parent_pte(struct kvm_vcpu *vcpu, static void mmu_page_remove_parent_pte(struct kvm_mmu_page *sp, u64 *parent_pte) { - pte_list_remove(parent_pte, &sp->parent_ptes); + __pte_list_remove(parent_pte, &sp->parent_ptes); } static void drop_parent_pte(struct kvm_mmu_page *sp,