KVM: x86: make FNAME(fetch) and __direct_map more similar
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Jun 2019 11:06:21 +0000 (13:06 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jul 2019 11:48:46 +0000 (13:48 +0200)
commit3fcf2d1bdeb6a513523cb2c77012a6b047aa859c
treee47b758e480016d9d4bc4b69409e3ee4342a3207
parent43fdcda96e2550c6d1c46fb8a78801aa2f7276ed
KVM: x86: make FNAME(fetch) and __direct_map more similar

These two functions are basically doing the same thing through
kvm_mmu_get_page, link_shadow_page and mmu_set_spte; yet, for historical
reasons, their code looks very different.  This patch tries to take the
best of each and make them very similar, so that it is easy to understand
changes that apply to both of them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h