From nobody Tue Apr 14 21:15:56 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FA84C00144 for ; Mon, 1 Aug 2022 11:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231411AbiHALpa (ORCPT ); Mon, 1 Aug 2022 07:45:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiHALp2 (ORCPT ); Mon, 1 Aug 2022 07:45:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D2A6D12E for ; Mon, 1 Aug 2022 04:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659354326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/M4Donr8YfwNuyCnZRmV/3XmMExqO8BbX6uoQN7f69Q=; b=ICuyVKJ2mQFB+rlFk0b1oub27223t+uRb8PROJvKrISDQc2tTuReVkmAegmDdg+dgjVcfx jY/jX/sb5c1+IQjl0kFO3pAN1o0GIyUYZz2R9Z8Zt1IhxS0JQ+zsl7Mm5W2tapt7ri/WBx qcycHQOFhOWla9Uj63W5xGYVCiLvjFQ= 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-301-CILmFWJ2MMqjT-ha8Fmd0w-1; Mon, 01 Aug 2022 07:45:24 -0400 X-MC-Unique: CILmFWJ2MMqjT-ha8Fmd0w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 558EE85A587; Mon, 1 Aug 2022 11:45:24 +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 3DDA840CFD0A; Mon, 1 Aug 2022 11:45:24 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH] KVM: x86/mmu: remove unused variable Date: Mon, 1 Aug 2022 07:45:24 -0400 Message-Id: <20220801114524.1249307-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The last use of 'pfn' went away with the same-named argument to host_pfn_mapping_level; now that the hugepage level is obtained exclusively from the host page tables, kvm_mmu_zap_collapsible_spte does not need to know host pfns at all. Fixes: a8ac499bb6ab ("KVM: x86/mmu: Don't require refcounted "struct page" = to create huge SPTEs") Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson --- arch/x86/kvm/mmu/mmu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 3e1317325e1f..4236a28b9be5 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -6416,13 +6416,11 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm= *kvm, u64 *sptep; struct rmap_iterator iter; int need_tlb_flush =3D 0; - kvm_pfn_t pfn; struct kvm_mmu_page *sp; =20 restart: for_each_rmap_spte(rmap_head, &iter, sptep) { sp =3D sptep_to_sp(sptep); - pfn =3D spte_to_pfn(*sptep); =20 /* * We cannot do huge page mapping for indirect shadow pages, --=20 2.31.1