]> git.itanic.dy.fi Git - linux-stable/commit
KVM: x86/mmu: Fold rmap_recycle into rmap_add
authorDavid Matlack <dmatlack@google.com>
Fri, 13 Aug 2021 20:35:00 +0000 (20:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:11:54 +0000 (11:11 +0200)
commitcc1504f6da2e81ab249eb801739c8fc0c1fd121f
treeeb1d1028218638c192297b33955b0c14f7afa9c8
parentdddae48eabfbbf955c7a679a10bd3a68295c8f62
KVM: x86/mmu: Fold rmap_recycle into rmap_add

[ Upstream commit 68be1306caea8948738cab04014ca4506b590d38 ]

Consolidate rmap_recycle and rmap_add into a single function since they
are only ever called together (and only from one place). This has a nice
side effect of eliminating an extra kvm_vcpu_gfn_to_memslot(). In
addition it makes mmu_set_spte(), which is a very long function, a
little shorter.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20210813203504.2742757-3-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Stable-dep-of: 604f533262ae ("KVM: x86/mmu: add missing update to max_mmu_rmap_size")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/mmu/mmu.c