Lines Matching defs:log
1536 * single O(1) operation versus two O(log(n)) operations for
2078 * @log: slot id and address to which we copy the log
2082 int kvm_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log,
2090 /* Dirty ring tracking may be exclusive to dirty log tracking */
2097 as_id = log->slot >> 16;
2098 id = (u16)log->slot;
2114 if (copy_to_user(log->dirty_bitmap, (*memslot)->dirty_bitmap, n))
2128 * @log: slot id and address to which we copy the log
2145 static int kvm_get_dirty_log_protect(struct kvm *kvm, struct kvm_dirty_log *log)
2155 /* Dirty ring tracking may be exclusive to dirty log tracking */
2159 as_id = log->slot >> 16;
2160 id = (u16)log->slot;
2211 if (copy_to_user(log->dirty_bitmap, dirty_bitmap_buffer, n))
2218 * kvm_vm_ioctl_get_dirty_log - get and clear the log of dirty pages in a slot
2220 * @log: slot id and address to which we copy the log
2228 * does not preclude user space subsequent dirty log read. Flushing TLB ensures
2229 * writes will be marked dirty for next log read.
2237 struct kvm_dirty_log *log)
2243 r = kvm_get_dirty_log_protect(kvm, log);
2253 * @log: slot id and address from which to fetch the bitmap of dirty pages
2256 struct kvm_clear_dirty_log *log)
2267 /* Dirty ring tracking may be exclusive to dirty log tracking */
2271 as_id = log->slot >> 16;
2272 id = (u16)log->slot;
2276 if (log->first_page & 63)
2286 n = ALIGN(log->num_pages, BITS_PER_LONG) / 8;
2288 if (log->first_page > memslot->npages ||
2289 log->num_pages > memslot->npages - log->first_page ||
2290 (log->num_pages < memslot->npages - log->first_page && (log->num_pages & 63)))
2297 if (copy_from_user(dirty_bitmap_buffer, log->dirty_bitmap, n))
2301 for (offset = log->first_page, i = offset / BITS_PER_LONG,
2302 n = DIV_ROUND_UP(log->num_pages, BITS_PER_LONG); n--;
2315 * a problem if userspace sets them in log->dirty_bitmap.
2332 struct kvm_clear_dirty_log *log)
2338 r = kvm_clear_dirty_log_protect(kvm, log);
4825 struct kvm_dirty_log log;
4828 if (copy_from_user(&log, argp, sizeof(log)))
4830 r = kvm_vm_ioctl_get_dirty_log(kvm, &log);
4835 struct kvm_clear_dirty_log log;
4838 if (copy_from_user(&log, argp, sizeof(log)))
4840 r = kvm_vm_ioctl_clear_dirty_log(kvm, &log);
5026 struct kvm_clear_dirty_log log;
5031 log.slot = compat_log.slot;
5032 log.num_pages = compat_log.num_pages;
5033 log.first_page = compat_log.first_page;
5034 log.padding2 = compat_log.padding2;
5035 log.dirty_bitmap = compat_ptr(compat_log.dirty_bitmap);
5037 r = kvm_vm_ioctl_clear_dirty_log(kvm, &log);
5043 struct kvm_dirty_log log;
5048 log.slot = compat_log.slot;
5049 log.padding1 = compat_log.padding1;
5050 log.padding2 = compat_log.padding2;
5051 log.dirty_bitmap = compat_ptr(compat_log.dirty_bitmap);
5053 r = kvm_vm_ioctl_get_dirty_log(kvm, &log);