]> git.baikalelectronics.ru Git - kernel.git/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)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:52 +0000 (03:44 -0400)
commiteba8572cf97a1d60358fc867c00509bb28bdfa39
tree4ef4f123382f5232d19c5780a0d7710a71ebab81
parent9ba32a10ac2dcf62b632ecdde7ec3a339a4c7efa
KVM: x86/mmu: Fold rmap_recycle into rmap_add

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>
arch/x86/kvm/mmu/mmu.c