Lines Matching full:header

18  * @header: stats header for a vm or a vcpu
29 * | Header |
40 * 1. Read header from offset 0. Get the offset of descriptors and stats data
52 ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header, in kvm_stats_read() argument
66 size_header = sizeof(*header); in kvm_stats_read()
67 size_desc = header->num_desc * sizeof(*desc); in kvm_stats_read()
76 * Copy kvm stats header. in kvm_stats_read()
77 * The header is the first block of content userspace usually read out. in kvm_stats_read()
78 * The pos is 0 and the copylen and remain would be the size of header. in kvm_stats_read()
79 * The copy of the header would be skipped if offset is larger than the in kvm_stats_read()
80 * size of header. That usually happens when userspace reads stats in kvm_stats_read()
86 src = (void *)header + pos; in kvm_stats_read()
95 * Copy kvm stats header id string. in kvm_stats_read()
98 * The id string is part of the stat header from the perspective of in kvm_stats_read()
100 * header part and could be skipped for later descriptors and stats in kvm_stats_read()
103 copylen = header->id_offset + KVM_STATS_NAME_SIZE - pos; in kvm_stats_read()
106 src = id + pos - header->id_offset; in kvm_stats_read()
119 * (header->header.desc_offset + size_desc) causing copylen <= 0. in kvm_stats_read()
121 copylen = header->desc_offset + size_desc - pos; in kvm_stats_read()
124 src = (void *)desc + pos - header->desc_offset; in kvm_stats_read()
133 copylen = header->data_offset + size_stats - pos; in kvm_stats_read()
136 src = stats + pos - header->data_offset; in kvm_stats_read()