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> CVE-2018-12207 (backported from commit 3fcf2d1b) [tyhicks: Backport to 4.4 - Minor context change due to mmu not being a pointer in the kvm_vcpu_arch struct - Continue to use pfn_t for the type of the pfn parameter of __direct_map()] Signed-off-by:
Tyler Hicks <tyhicks@canonical.com> Signed-off-by:
Stefan Bader <stefan.bader@canonical.com>
Showing
Please register or sign in to comment