Skip to content
Commit cc1504f6 authored by David Matlack's avatar David Matlack Committed by Greg Kroah-Hartman
Browse files

KVM: x86/mmu: Fold rmap_recycle into rmap_add

[ Upstream commit 68be1306

 ]

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: default avatarDavid Matlack <dmatlack@google.com>
Message-Id: <20210813203504.2742757-3-dmatlack@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Stable-dep-of: 604f5332

 ("KVM: x86/mmu: add missing update to max_mmu_rmap_size")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent dddae48e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment