Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5136794iog; Wed, 22 Jun 2022 12:47:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seEXPJoGNa/T1M14TDgY5BULJedcdH3e3Zil++9/0ggEB3CckLUxpl3E/N/fjCVj15dgpd X-Received: by 2002:a63:fa41:0:b0:408:9d1b:2e57 with SMTP id g1-20020a63fa41000000b004089d1b2e57mr4368649pgk.102.1655927265476; Wed, 22 Jun 2022 12:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655927265; cv=none; d=google.com; s=arc-20160816; b=m2j8oVsRRVawiax4vd5o6eCqRX0LhJEY/Pdfg/ZZHSqiZFMEHVpaGTytUT3vZqNiml jlNzE7isCunUpCqd9CtMJ7YS576TkmPQ2PmLEPJinKN2ftR7nFiIGBfbBYJ8H7t+tpdi y6u5BgeIKR+qxBb8xyUUVnE2l3l7DgDPvo1Yc29E79depor36/F06YS4rjTCv+PhwlNp SBJiueFGFjJs7O6lf30c46aRxNn84zJq2yUFlQ01ztpXyBHKdcNAyDvVwJMzfFgLGQ8u jTmEJohb8sC+odL5Q0vB/Td1+corLmaetfKEYSMZvcmqQUItL+w0ZcoKN6mfqgi0wRrN j2iw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vBDQ+Ux7UpzAbTw4UCwRkx++8KnilVl+Axd/GWC+/NY=; b=jrgTs0fT4PqkSObUSOFodsKJ20snyBqIi8kiRsrCiERDyl+X4jdgXT0eXBNKYZsth0 aZHPs0681EmHIbp/adeaQO7e0lZGqJWrZsHxodQvQAWCSu1L8nS2fxGEa432lRiqarCR g0iaGJ/atLjdhkPhsp41WuabasbM3DsM0Dea6Nf31hBYYWx5Hk+A/ovFiuuFQhmpI8Oi hwzu6IBIk5/qyE5TmfpbEp8U4LlwzoKD0Xy5fWfw93VkrWVnYOAHW1TnSGY6PS/47HyJ /NqiH3PjuQBx3LAP397AmX5LqMYoroNem8DFHhVJZPRg8RnPQb4k50adbEFO2CBgOGpf sZqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B7LRdGP+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o38-20020a635d66000000b004028548c462si24845754pgm.469.2022.06.22.12.47.33; Wed, 22 Jun 2022 12:47:45 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B7LRdGP+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358942AbiFVT2W (ORCPT + 99 others); Wed, 22 Jun 2022 15:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357100AbiFVT1Z (ORCPT ); Wed, 22 Jun 2022 15:27:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABCF33CA74 for ; Wed, 22 Jun 2022 12:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655926039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vBDQ+Ux7UpzAbTw4UCwRkx++8KnilVl+Axd/GWC+/NY=; b=B7LRdGP+z9tkrtKwTLbEB6KIvWdZ4UfhRc3Kt4ZtFGi3cd852i7jzmHTO/zBDp8R4VGgMk FWhUTRefbQpqX8oihPNQqYiT0q8QRm+BCB9dk3RirdyqxRWGy2WFSAUxzqqPzCGqPFw+P0 1V3PtOVN8DQsy19lNIhYyGcc9N4huig= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-298-Xmy93p0rMEmSYEVzbpZ1oQ-1; Wed, 22 Jun 2022 15:27:17 -0400 X-MC-Unique: Xmy93p0rMEmSYEVzbpZ1oQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C5ACE18A6581; Wed, 22 Jun 2022 19:27:16 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71A0F141510C; Wed, 22 Jun 2022 19:27:16 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: maz@kernel.org, anup@brainfault.org, seanjc@google.com, bgardon@google.com, peterx@redhat.com, maciej.szmigiero@oracle.com, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, pfeiner@google.com, jiangshanlai@gmail.com, dmatlack@google.com Subject: [PATCH v7 14/23] KVM: x86/mmu: Pass const memslot to rmap_add() Date: Wed, 22 Jun 2022 15:27:01 -0400 Message-Id: <20220622192710.2547152-15-pbonzini@redhat.com> In-Reply-To: <20220622192710.2547152-1-pbonzini@redhat.com> References: <20220622192710.2547152-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: David Matlack Constify rmap_add()'s @slot parameter; it is simply passed on to gfn_to_rmap(), which takes a const memslot. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: David Matlack Message-Id: <20220516232138.1783324-15-dmatlack@google.com> Signed-off-by: Paolo Bonzini --- arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index a7748c5a2385..45a4e85c0b2c 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1556,7 +1556,7 @@ static bool kvm_test_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head, #define RMAP_RECYCLE_THRESHOLD 1000 -static void rmap_add(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot, +static void rmap_add(struct kvm_vcpu *vcpu, const struct kvm_memory_slot *slot, u64 *spte, gfn_t gfn) { struct kvm_mmu_page *sp; -- 2.31.1