diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2010-10-22 12:18:18 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:28:40 -0500 |
commit | 612819c3c6e67bac8fceaa7cc402f13b1b63f7e4 (patch) | |
tree | 3739b8420660fc4de8d37d26004d9992e92acbe3 /include/linux/kvm_host.h | |
parent | 7905d9a5ad7a83f1c1c00559839857ab90afbdfc (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.h | 5 |
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 | ||
335 | pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr); | 335 | pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr); |
336 | pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn); | 336 | pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn); |
337 | pfn_t gfn_to_pfn_async(struct kvm *kvm, gfn_t gfn, bool *async); | 337 | pfn_t gfn_to_pfn_async(struct kvm *kvm, gfn_t gfn, bool *async, |
338 | bool write_fault, bool *writable); | ||
338 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); | 339 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); |
340 | pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault, | ||
341 | bool *writable); | ||
339 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, | 342 | pfn_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); |
341 | int memslot_id(struct kvm *kvm, gfn_t gfn); | 344 | int memslot_id(struct kvm *kvm, gfn_t gfn); |