From patchwork Tue Mar 5 00:37:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13581379 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 352633211 for ; Tue, 5 Mar 2024 00:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709599066; cv=none; b=n9gk4DNVHJk18Cb/Y1PsMeqYfiVYeAbY0RabTLWNoytgOAY6egORyt3XCq9rWG1HI2SktDWae8+xghPwTL4laUvA8np6ys0uBNGKh2V9yeJyoQsxA+ywYQUsZgWKaIOAnJWhDIxGqH+aZkzV0JHuOIun5YLa1mnroMoqhRzYbzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709599066; c=relaxed/simple; bh=DUXhp+g4qoxMZncdiQGNSWIv8z7LVY9hkgbsTfx2fRQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=fK3Rr+vGkojfNQEIhbJRBhx3vThCgXKno8iQcIlIwBifHBVHhXskCw9r5fAUifHASIPPwuAsMfVwmaztS/esldVGurksQSskxZDF5++i4yBRvZ89x1Goxgqj+QRDrqS/mpEiyt0+yhht+5PmYe7f/ykCpAfePFAZExQQassJ6aY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Mh0LXIwk; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Mh0LXIwk" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-29ad35a8650so4842508a91.0 for ; Mon, 04 Mar 2024 16:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709599064; x=1710203864; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=qPDZDFGuvVe1xm4D1iYkB/saEEgYVA3F8rFzvBJXEcU=; b=Mh0LXIwkXgNwesFjha1FKnlA6c5sgTK0SKWV0vtb2srlO6C5NbuG+bux91YkryI1By rjitqWdS+0/mGelKxvuuF6EI48hPLdKski437eF5MuQ5DREOy5J42wdS5J2yVzq0xsuB epHDy/jX/ltAOAWXC+5BQNFOADIa0ieO0gGoADQzC/OQ8O3dPJARA0iZ/IQQKNwQDywh n6n0W65lkLA+T6VmZefqmov0Uvlz8fD8MPn57MkRM6dpIOW9fe4F5rMVP63+ZJnWX8sc MG/lTXjmXXPf9bREGw782OjOwp00taOEA8zrgYYRKBAvf/HONzBiqqgcC8eEYMVUQTXB nGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709599064; x=1710203864; h=cc:to:from:subject:message-id:mime-version:date:reply-to :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qPDZDFGuvVe1xm4D1iYkB/saEEgYVA3F8rFzvBJXEcU=; b=c0miBPdSFYSsiVYudzNaopGi8X7rQwSBTDEqtU3oORvRb3E0it1AJ1OLphUG7Q/LhI Qdms94RwxRXlS7tBGNxFzLWTk1PdhTRw/uCKPcs/Jyfgz0K1vSH+GDItnZN3pzy5bz0c xfwdXo4oylVBEtijLzqRAIuEhG/OpNaKzGRdat0vlrtdh9q5uFghjlc44sLnVQ5g8NM4 4kG63NcAiOScb0OiqBV4u/DwpHM6hh4183Cb19fdw93qThb7QcQiX7DW0QZiz+jdO+hQ P5PwARHSFwXTKqSHP7xsmf/8UUFvq6HPiP+ztfMwy1xmE4cC+qp7K4m08d1KAyqZcDbT PIgQ== X-Gm-Message-State: AOJu0Yz+stqhem4HHJ22dqqglajv1kds6vzHzbrlf1A0WyB8QHupWi+X 5JDAhx9q36yQMS/nGVyK5PTW0YAlBVgnmL5HSuavLMW9jZMRwXIoae06/hWXgSSvdwecH3RKMuX IYw== X-Google-Smtp-Source: AGHT+IEIR3UYe44S1T2sQALNQ9lpMFR1+QrQVzgvSlJIhG/glLcCrrCzAf9Qa7vrIu0VeJkZ+mhlNOZcKOY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:5414:b0:29b:2fb2:e2a1 with SMTP id z20-20020a17090a541400b0029b2fb2e2a1mr5802pjh.2.1709599064239; Mon, 04 Mar 2024 16:37:44 -0800 (PST) Reply-To: Sean Christopherson Date: Mon, 4 Mar 2024 16:37:42 -0800 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240305003742.245767-1-seanjc@google.com> Subject: [PATCH] KVM: Drop unused @may_block param from gfn_to_pfn_cache_invalidate_start() From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Like Xu , Paul Durrant , David Woodhouse , Sean Christopherson Remove gfn_to_pfn_cache_invalidate_start()'s unused @may_block parameter, which was leftover from KVM's abandoned (for now) attempt to support guest usage of gfn_to_pfn caches. Fixes: a4bff3df5147 ("KVM: pfncache: remove KVM_GUEST_USES_PFN usage") Reported-by: Like Xu Cc: Paul Durrant Cc: David Woodhouse Signed-off-by: Sean Christopherson Reviewed-by: Paul Durrant Reviewed-by: David Woodhouse --- virt/kvm/kvm_main.c | 3 +-- virt/kvm/kvm_mm.h | 6 ++---- virt/kvm/pfncache.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) base-commit: 003d914220c97ef93cabfe3ec4e245e2383e19e9 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ff588677beb7..7106b57b8468 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -832,8 +832,7 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn, * mn_active_invalidate_count (see above) instead of * mmu_invalidate_in_progress. */ - gfn_to_pfn_cache_invalidate_start(kvm, range->start, range->end, - hva_range.may_block); + gfn_to_pfn_cache_invalidate_start(kvm, range->start, range->end); /* * If one or more memslots were found and thus zapped, notify arch code diff --git a/virt/kvm/kvm_mm.h b/virt/kvm/kvm_mm.h index ecefc7ec51af..715f19669d01 100644 --- a/virt/kvm/kvm_mm.h +++ b/virt/kvm/kvm_mm.h @@ -26,13 +26,11 @@ kvm_pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool interruptible, #ifdef CONFIG_HAVE_KVM_PFNCACHE void gfn_to_pfn_cache_invalidate_start(struct kvm *kvm, unsigned long start, - unsigned long end, - bool may_block); + unsigned long end); #else static inline void gfn_to_pfn_cache_invalidate_start(struct kvm *kvm, unsigned long start, - unsigned long end, - bool may_block) + unsigned long end) { } #endif /* HAVE_KVM_PFNCACHE */ diff --git a/virt/kvm/pfncache.c b/virt/kvm/pfncache.c index 9ac8c9da4eda..bff9875cdcd2 100644 --- a/virt/kvm/pfncache.c +++ b/virt/kvm/pfncache.c @@ -23,7 +23,7 @@ * MMU notifier 'invalidate_range_start' hook. */ void gfn_to_pfn_cache_invalidate_start(struct kvm *kvm, unsigned long start, - unsigned long end, bool may_block) + unsigned long end) { struct gfn_to_pfn_cache *gpc;