aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-10-22 12:18:18 -0400
committerAvi Kivity <avi@redhat.com>2011-01-12 04:28:40 -0500
commit612819c3c6e67bac8fceaa7cc402f13b1b63f7e4 (patch)
tree3739b8420660fc4de8d37d26004d9992e92acbe3 /include/linux/kvm_host.h
parent7905d9a5ad7a83f1c1c00559839857ab90afbdfc (diff)
KVM: propagate fault r/w information to gup(), allow read-only memory
As suggested by Andrea, pass r/w error code to gup(), upgrading read fault to writable if host pte allows it. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ee4314e15ead..462b982fedfb 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -334,8 +334,11 @@ void kvm_set_page_accessed(struct page *page);
334 334
335pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr); 335pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr);
336pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn); 336pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn);
337pfn_t gfn_to_pfn_async(struct kvm *kvm, gfn_t gfn, bool *async); 337pfn_t gfn_to_pfn_async(struct kvm *kvm, gfn_t gfn, bool *async,
338 bool write_fault, bool *writable);
338pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); 339pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn);
340pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault,
341 bool *writable);
339pfn_t gfn_to_pfn_memslot(struct kvm *kvm, 342pfn_t gfn_to_pfn_memslot(struct kvm *kvm,
340 struct kvm_memory_slot *slot, gfn_t gfn); 343 struct kvm_memory_slot *slot, gfn_t gfn);
341int memslot_id(struct kvm *kvm, gfn_t gfn); 344int memslot_id(struct kvm *kvm, gfn_t gfn);