Lines Matching refs:hvc
52 static int do_ops(struct host_vm_change *hvc, int end,
59 op = &hvc->ops[i];
62 ret = map(hvc->id, op->u.mmap.addr, op->u.mmap.len,
64 op->u.mmap.offset, finished, &hvc->data);
67 ret = unmap(hvc->id, op->u.munmap.addr,
68 op->u.munmap.len, finished, &hvc->data);
71 ret = protect(hvc->id, op->u.mprotect.addr,
73 finished, &hvc->data);
86 unsigned int prot, struct host_vm_change *hvc)
93 if (hvc->index != 0) {
94 last = &hvc->ops[hvc->index - 1];
104 if (hvc->index == ARRAY_SIZE(hvc->ops)) {
105 ret = do_ops(hvc, ARRAY_SIZE(hvc->ops), 0);
106 hvc->index = 0;
109 hvc->ops[hvc->index++] = ((struct host_vm_op)
121 struct host_vm_change *hvc)
126 if (hvc->index != 0) {
127 last = &hvc->ops[hvc->index - 1];
135 if (hvc->index == ARRAY_SIZE(hvc->ops)) {
136 ret = do_ops(hvc, ARRAY_SIZE(hvc->ops), 0);
137 hvc->index = 0;
140 hvc->ops[hvc->index++] = ((struct host_vm_op)
148 unsigned int prot, struct host_vm_change *hvc)
153 if (hvc->index != 0) {
154 last = &hvc->ops[hvc->index - 1];
163 if (hvc->index == ARRAY_SIZE(hvc->ops)) {
164 ret = do_ops(hvc, ARRAY_SIZE(hvc->ops), 0);
165 hvc->index = 0;
168 hvc->ops[hvc->index++] = ((struct host_vm_op)
180 struct host_vm_change *hvc)
201 if (hvc->force || pte_newpage(*pte)) {
204 PAGE_SIZE, prot, hvc);
206 ret = add_munmap(addr, PAGE_SIZE, hvc);
208 ret = add_mprotect(addr, PAGE_SIZE, prot, hvc);
216 struct host_vm_change *hvc)
226 if (hvc->force || pmd_newpage(*pmd)) {
227 ret = add_munmap(addr, next - addr, hvc);
231 else ret = update_pte_range(pmd, addr, next, hvc);
238 struct host_vm_change *hvc)
248 if (hvc->force || pud_newpage(*pud)) {
249 ret = add_munmap(addr, next - addr, hvc);
253 else ret = update_pmd_range(pud, addr, next, hvc);
262 struct host_vm_change hvc;
266 hvc = INIT_HVC(mm, force);
272 ret = add_munmap(addr, next - addr, &hvc);
276 else ret = update_pud_range(pgd, addr, next, &hvc);
280 ret = do_ops(&hvc, hvc.index, 1);