KVM: Introduce gfn_to_hva_memslot_prot
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 19 Aug 2014 10:15:00 +0000 (12:15 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 27 Aug 2014 20:46:08 +0000 (22:46 +0200)
commit64d831269ccbca1fc6d739a0f3c8aa24afb43a5e
treef31585ef953ddd09ab3327b79a9b0b406a089f8e
parent7b46268d29543e313e731606d845e65c17f232e4
KVM: Introduce gfn_to_hva_memslot_prot

To support read-only memory regions on arm and arm64, we have a need to
resolve a gfn to an hva given a pointer to a memslot to avoid looping
through the memslots twice and to reuse the hva error checking of
gfn_to_hva_prot(), add a new gfn_to_hva_memslot_prot() function and
refactor gfn_to_hva_prot() to use this function.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
include/linux/kvm_host.h
virt/kvm/kvm_main.c
This page took 0.036407 seconds and 5 git commands to generate.