Searched refs:ghc (Results 1 - 2 of 2) sorted by relevance
/linux-4.4.14/virt/kvm/ |
H A D | kvm_main.c | 1811 int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, kvm_gfn_to_hva_cache_init() argument 1821 ghc->gpa = gpa; kvm_gfn_to_hva_cache_init() 1822 ghc->generation = slots->generation; kvm_gfn_to_hva_cache_init() 1823 ghc->len = len; kvm_gfn_to_hva_cache_init() 1824 ghc->memslot = gfn_to_memslot(kvm, start_gfn); kvm_gfn_to_hva_cache_init() 1825 ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn, NULL); kvm_gfn_to_hva_cache_init() 1826 if (!kvm_is_error_hva(ghc->hva) && nr_pages_needed <= 1) { kvm_gfn_to_hva_cache_init() 1827 ghc->hva += offset; kvm_gfn_to_hva_cache_init() 1834 ghc->memslot = gfn_to_memslot(kvm, start_gfn); kvm_gfn_to_hva_cache_init() 1835 ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn, kvm_gfn_to_hva_cache_init() 1837 if (kvm_is_error_hva(ghc->hva)) kvm_gfn_to_hva_cache_init() 1842 ghc->memslot = NULL; kvm_gfn_to_hva_cache_init() 1848 int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, kvm_write_guest_cached() argument 1854 BUG_ON(len > ghc->len); kvm_write_guest_cached() 1856 if (slots->generation != ghc->generation) kvm_write_guest_cached() 1857 kvm_gfn_to_hva_cache_init(kvm, ghc, ghc->gpa, ghc->len); kvm_write_guest_cached() 1859 if (unlikely(!ghc->memslot)) kvm_write_guest_cached() 1860 return kvm_write_guest(kvm, ghc->gpa, data, len); kvm_write_guest_cached() 1862 if (kvm_is_error_hva(ghc->hva)) kvm_write_guest_cached() 1865 r = __copy_to_user((void __user *)ghc->hva, data, len); kvm_write_guest_cached() 1868 mark_page_dirty_in_slot(ghc->memslot, ghc->gpa >> PAGE_SHIFT); kvm_write_guest_cached() 1874 int kvm_read_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, kvm_read_guest_cached() argument 1880 BUG_ON(len > ghc->len); kvm_read_guest_cached() 1882 if (slots->generation != ghc->generation) kvm_read_guest_cached() 1883 kvm_gfn_to_hva_cache_init(kvm, ghc, ghc->gpa, ghc->len); kvm_read_guest_cached() 1885 if (unlikely(!ghc->memslot)) kvm_read_guest_cached() 1886 return kvm_read_guest(kvm, ghc->gpa, data, len); kvm_read_guest_cached() 1888 if (kvm_is_error_hva(ghc->hva)) kvm_read_guest_cached() 1891 r = __copy_from_user(data, (void __user *)ghc->hva, len); kvm_read_guest_cached()
|
/linux-4.4.14/include/linux/ |
H A D | kvm_host.h | 624 int kvm_read_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, 630 int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, 632 int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc,
|
Completed in 113 milliseconds