Raise the lower bound to '64' as that seems to currently be the first
size that can fit the CPU data for a modern cpu.
Lower the upper bound to an arbitrary 65536. So many cpu features ougth
to be enough for everyone.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* the 'nent' field is adjusted and an error (ENOMEM) is returned. If the
* number is just right, the 'nent' field is adjusted to the number of valid
* entries in the 'entries' array, which is then filled. */
- for (alloc_size = 1; alloc_size < INT32_MAX; alloc_size *= 2) {
+ for (alloc_size = 64; alloc_size <= 65536; alloc_size *= 2) {
g_autofree struct kvm_cpuid2 *kvm_cpuid = NULL;
kvm_cpuid = g_malloc0(sizeof(struct kvm_cpuid2) +