diff options
author | Filippo Sironi <sironi@amazon.de> | 2019-01-31 21:24:33 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-04-30 21:32:45 +0200 |
commit | bd53cb35a3e9adb73a834a36586e9ad80e877767 (patch) | |
tree | 851b21fe7617e39fa130ac9944da1c3a64378d90 /virt | |
parent | 3d5f6beb74a00bcc308612ee007e3e0c6126c397 (diff) | |
download | linux-bd53cb35a3e9adb73a834a36586e9ad80e877767.tar.bz2 |
X86/KVM: Handle PFNs outside of kernel reach when touching GPTEs
cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of
pages and the respective struct page to map in the kernel virtual
address space.
This doesn't work if get_user_pages_fast() is invoked with a userspace
virtual address that's backed by PFNs outside of kernel reach (e.g., when
limiting the kernel memory with mem= in the command line and using
/dev/mem to map memory).
If get_user_pages_fast() fails, look up the VMA that back the userspace
virtual address, compute the PFN and the physical address, and map it in
the kernel virtual address space with memremap().
Signed-off-by: Filippo Sironi <sironi@amazon.de>
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions