Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1315147iog; Thu, 30 Jun 2022 23:31:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vc3jWyZo2Q1yrVx7tLLmcsn5ln1TWDoBcri7QPiY4+9CQZASQ2QeJdUUrGP1ag/mznPsNs X-Received: by 2002:a05:6402:4387:b0:435:94c6:716d with SMTP id o7-20020a056402438700b0043594c6716dmr17107543edc.298.1656657100803; Thu, 30 Jun 2022 23:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656657100; cv=none; d=google.com; s=arc-20160816; b=ua0XKJrGIr8aUTeSCWuEgCxqjxmoHuzfP6Cbd2he2SCEdaCQV45hACU6GDfMFOCPTk m1hZBC9ZAfX4XGdt3DB2h8f1fwAQ8fd9aj2aj+Ea6Y2XFyJrDHE2klNQRS7IKOKvQ79M jG1F3tN8hOUqXb32I3HRGqs0t/rinLj4EPfCPIstqbx2dns/fmo3Cdxt2qVlRvyCupMA fAPQcDKl7cqqSr/dFXnh0Vp0kNgupQQLAdz5wId7NSw+BQGMrvaH5dbeJ2X1+qtUUU1C ZZ5C8Qtjbu4YOBQUdvsJwc7k2P6TOBBH8eWGjiEgtSev1BBROjlEBi74DmTBIooYw0SO DPJQ== 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 :message-id:date:subject:cc:to:from; bh=zUpF/630hxEBrNCMvhVAOWr8lAGQpbyVCvB6v0BG90E=; b=XltidOryyQwF1wbuYI5mvLExooSgrAa0Q1pbrl99oJ5whpDnaRfo4kE30rMVWHNJ7x Brwm/hxHtVdvGcf1U9Ul9wKyPo102ROI0QqmV63iOXw7XW9bEHrY+AYsauRhv0Kh46fa SA4erVHMkpwLK1judECwRwQl4nMHIZx1WMvOi/lnsHH6Sh8Y/1oEZ79KJ+K15TmqYUlO sD4pz8UDtaJyu8g5f+c9q5tOcElxSkfoJjrukOsIH+dVGQ7TeEwxSJk2sx/hLzrPCqWb NhFcSWB2l8JpxjTYOdRQlwqinq3d7a493eXH4vHHmVx7KX3pxC67cYGjK8ZKz5i9utQp me/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne29-20020a1709077b9d00b00726be4f1882si8459916ejc.208.2022.06.30.23.31.16; Thu, 30 Jun 2022 23:31:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235305AbiGAG33 (ORCPT + 99 others); Fri, 1 Jul 2022 02:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbiGAG3V (ORCPT ); Fri, 1 Jul 2022 02:29:21 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71D5635DCB; Thu, 30 Jun 2022 23:28:49 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id A67D61E80D21; Fri, 1 Jul 2022 14:27:19 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1r7Sg3ixidkE; Fri, 1 Jul 2022 14:27:16 +0800 (CST) Received: from localhost.localdomain (unknown [112.65.12.78]) (Authenticated sender: jiaming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 242571E80D09; Fri, 1 Jul 2022 14:27:15 +0800 (CST) From: Zhang Jiaming To: anup@brainfault.org, atishp@atishpatra.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, renyu@nfschina.com, Zhang Jiaming Subject: [PATCH] RISC-V: KVM: Fix variable spelling mistake Date: Fri, 1 Jul 2022 14:28:38 +0800 Message-Id: <20220701062838.6727-1-jiaming@nfschina.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a spelling mistake in mmu.c and vcpu_exit.c. Fix it. Signed-off-by: Zhang Jiaming --- arch/riscv/kvm/mmu.c | 8 ++++---- arch/riscv/kvm/vcpu_exit.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c index 1c00695ebee7..2965284a490d 100644 --- a/arch/riscv/kvm/mmu.c +++ b/arch/riscv/kvm/mmu.c @@ -611,7 +611,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu, { int ret; kvm_pfn_t hfn; - bool writeable; + bool writable; short vma_pageshift; gfn_t gfn = gpa >> PAGE_SHIFT; struct vm_area_struct *vma; @@ -659,7 +659,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu, mmu_seq = kvm->mmu_notifier_seq; - hfn = gfn_to_pfn_prot(kvm, gfn, is_write, &writeable); + hfn = gfn_to_pfn_prot(kvm, gfn, is_write, &writable); if (hfn == KVM_PFN_ERR_HWPOISON) { send_sig_mceerr(BUS_MCEERR_AR, (void __user *)hva, vma_pageshift, current); @@ -673,14 +673,14 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu, * for write faults. */ if (logging && !is_write) - writeable = false; + writable = false; spin_lock(&kvm->mmu_lock); if (mmu_notifier_retry(kvm, mmu_seq)) goto out_unlock; - if (writeable) { + if (writable) { kvm_set_pfn_dirty(hfn); mark_page_dirty(kvm, gfn); ret = gstage_map_page(kvm, pcache, gpa, hfn << PAGE_SHIFT, diff --git a/arch/riscv/kvm/vcpu_exit.c b/arch/riscv/kvm/vcpu_exit.c index dbb09afd7546..f4e569688619 100644 --- a/arch/riscv/kvm/vcpu_exit.c +++ b/arch/riscv/kvm/vcpu_exit.c @@ -417,17 +417,17 @@ static int gstage_page_fault(struct kvm_vcpu *vcpu, struct kvm_run *run, { struct kvm_memory_slot *memslot; unsigned long hva, fault_addr; - bool writeable; + bool writable; gfn_t gfn; int ret; fault_addr = (trap->htval << 2) | (trap->stval & 0x3); gfn = fault_addr >> PAGE_SHIFT; memslot = gfn_to_memslot(vcpu->kvm, gfn); - hva = gfn_to_hva_memslot_prot(memslot, gfn, &writeable); + hva = gfn_to_hva_memslot_prot(memslot, gfn, &writable); if (kvm_is_error_hva(hva) || - (trap->scause == EXC_STORE_GUEST_PAGE_FAULT && !writeable)) { + (trap->scause == EXC_STORE_GUEST_PAGE_FAULT && !writable)) { switch (trap->scause) { case EXC_LOAD_GUEST_PAGE_FAULT: return emulate_load(vcpu, run, fault_addr, -- 2.25.1