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