]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm: Cache gfn to pfn translation
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 5 Dec 2019 01:30:51 +0000 (01:30 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Jan 2020 17:45:55 +0000 (18:45 +0100)
commit91fb0e088b014d069e92dd780c14880c6823a484
tree4c865f9aeb61137847ce9d283bc33febded17714
parentf1ad0009b4fd63162160474acaada813ec6021b3
x86/kvm: Cache gfn to pfn translation

__kvm_map_gfn()'s call to gfn_to_pfn_memslot() is
* relatively expensive
* in certain cases (such as when done from atomic context) cannot be called

Stashing gfn-to-pfn mapping should help with both cases.

This is part of CVE-2019-3016.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h
include/linux/kvm_types.h
virt/kvm/kvm_main.c