From patchwork Mon Nov 5 06:45:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 10667443 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 4945E13A4 for ; Mon, 5 Nov 2018 06:45:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37F7B287FD for ; Mon, 5 Nov 2018 06:45:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B44129511; Mon, 5 Nov 2018 06:45:36 +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 B4E07287FD for ; Mon, 5 Nov 2018 06:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729404AbeKEQDm (ORCPT ); Mon, 5 Nov 2018 11:03:42 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34569 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbeKEQDm (ORCPT ); Mon, 5 Nov 2018 11:03:42 -0500 Received: by mail-pf1-f194.google.com with SMTP id y18-v6so1536522pfn.1 for ; Sun, 04 Nov 2018 22:45:33 -0800 (PST) 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=EzgUh5WNvOCzxv1/+2I08U+V7CImMhV0oSdRhhyaX2M=; b=iDkkVsbbcYguwSq1AUfZ1YJWJdJWCdfyl1ps/0P5ZFvG3rcIAM6bhOdmjccGJ7+IMl h/Y/MQts0KfyMcOjKPvMUmVqKsdv14x8HdWwMDo8J0qBTDr4/Iq1zZxxasOmQo8fIzjC A65+GoEKTclrtf4IGR/S5GTycRRchoEduAVKrQvLzRrOlziU8M+sBqaCGdJ1umC2UL0P 9i4lGOe1Ect/jcqktPCPrmvWogTTnyZjeIhP7Cx2+RGSD/ym6ctyN3By2uWu8eclWe3b sw/ylsUxqbTcoF0xdTz7rCkzYyOiwX4XwBMUFo6p6ZYguhHwbD80CLa553W1Kb5ByuoR xB2w== 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=EzgUh5WNvOCzxv1/+2I08U+V7CImMhV0oSdRhhyaX2M=; b=gHH+QkXOkJW0liMpYmqLAG6wf1G22S/hS3G+4gG8T+v0POgoygvFZeAx9VhquKAdqS 31whRU53GdJrr5wj6E6bYBbviVTFbEnfV1/y4iNo04X7/3NEAQYyYCagQuSh7HMTnsKB nxWFG1XR28fgATg+j3r7dy5Wle9FFco0W4rKwKcP/IdC4DzzgSY5LE1cd1nRajBtEcOX 7qoPvs+E3r0IITiJZve5vkHoR+RE3QpGFEJjHzMk+E39g8763drqoSLaWKBRd40wYXq6 6yw51gKlypm/I744mINirDvfvTUXYK6LgaC6QUk0/E3J5ecESGBMb+oJdLYvaIonqnEx QB/Q== X-Gm-Message-State: AGRZ1gJMh75X0/TpefSaigSXO6pJlxRNCSZcSotSBBegJOlQH5yhpbYw f8e2gXMyV5cLxTvZvk9Q91w= X-Google-Smtp-Source: AJdET5c0byR0j/l8WlHHisaX7gz8ZmImmkIDC0SQt1XymKsQ9Lsz8hR/7eEQWMLez43G5oQbfyFJnw== X-Received: by 2002:a65:6295:: with SMTP id f21-v6mr19229972pgv.167.1541400333063; Sun, 04 Nov 2018 22:45:33 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id h70-v6sm9755177pfe.65.2018.11.04.22.45.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Nov 2018 22:45:32 -0800 (PST) From: Wei Yang To: pbonzini@redhat.com, rkrcmar@redhat.com Cc: x86@kernel.org, kvm@vger.kernel.org, Wei Yang Subject: [PATCH 2/2] KVM: fix some typo and one code style Date: Mon, 5 Nov 2018 14:45:03 +0800 Message-Id: <20181105064503.36285-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20181105064503.36285-1-richard.weiyang@gmail.com> References: <20181105064503.36285-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 patch fix some typo in comment and merge two lines to one within 80 characters. Signed-off-by: Wei Yang --- arch/x86/kvm/mmu.c | 6 +++--- arch/x86/kvm/x86.c | 4 ++-- virt/kvm/async_pf.c | 2 +- virt/kvm/kvm_main.c | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3730d482d2fd..bb587e7e8771 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4240,7 +4240,7 @@ static inline bool is_last_gpte(struct kvm_mmu *mmu, unsigned level, unsigned gpte) { /* - * The RHS has bit 7 set iff level < mmu->last_nonleaf_level. + * The RHS has bit 7 set if level < mmu->last_nonleaf_level. * If it is clear, there are no large pages at this level, so clear * PT_PAGE_SIZE_MASK in gpte if that is the case. */ @@ -4248,7 +4248,7 @@ static inline bool is_last_gpte(struct kvm_mmu *mmu, /* * PT_PAGE_TABLE_LEVEL always terminates. The RHS has bit 7 set - * iff level <= PT_PAGE_TABLE_LEVEL, which for our purpose means + * if level <= PT_PAGE_TABLE_LEVEL, which for our purpose means * level == PT_PAGE_TABLE_LEVEL; set PT_PAGE_SIZE_MASK in gpte then. */ gpte |= level - PT_PAGE_TABLE_LEVEL - 1; @@ -5646,7 +5646,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, * spte from present to present (changing the spte from present * to nonpresent will flush all the TLBs immediately), in other * words, the only case we care is mmu_spte_update() where we - * haved checked SPTE_HOST_WRITEABLE | SPTE_MMU_WRITEABLE + * have checked SPTE_HOST_WRITEABLE | SPTE_MMU_WRITEABLE * instead of PT_WRITABLE_MASK, that means it does not depend * on PT_WRITABLE_MASK anymore. */ diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 76f8d46be05d..71bd9e0aa540 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9278,7 +9278,7 @@ static void kvm_mmu_slot_apply_flags(struct kvm *kvm, * with dirty logging disabled in order to eliminate unnecessary GPA * logging in PML buffer (and potential PML buffer full VMEXT). This * guarantees leaving PML enabled during guest's lifetime won't have - * any additonal overhead from PML when guest is running with dirty + * any additional overhead from PML when guest is running with dirty * logging disabled for memory slots. * * kvm_x86_ops->slot_enable_log_dirty is called when switching new slot @@ -9531,7 +9531,7 @@ static void kvm_del_async_pf_gfn(struct kvm_vcpu *vcpu, gfn_t gfn) return; k = kvm_async_pf_hash_fn(vcpu->arch.apf.gfns[j]); /* - * k lies cyclically in ]i,j] + * k lies cyclically in [i,j] * | i.k.j | * |....j i.k.| or |.k..j i...| */ diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 4f4f6eac88a4..eca271767899 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -82,7 +82,7 @@ static void async_pf_execute(struct work_struct *work) might_sleep(); /* - * This work is run asynchromously to the task which owns + * This work is run asynchronously to the task which owns * mm and might be done in another context, so we must * access remotely. */ diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2679e476b6c3..c9cad4f22960 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1569,8 +1569,7 @@ kvm_pfn_t __gfn_to_pfn_memslot(struct kvm_memory_slot *slot, gfn_t gfn, writable = NULL; } - return hva_to_pfn(addr, atomic, async, write_fault, - writable); + return hva_to_pfn(addr, atomic, async, write_fault, writable); } EXPORT_SYMBOL_GPL(__gfn_to_pfn_memslot);