Skip to contentSkip to conversation

KVM_GET_SUPPORTED_CPUID returning -E2BIG

DISCUSSION Sasha Levin 2 participants 2 messages May 8, 2011 KVM

lore
Share & tools
lore
#0 lore raw

Hello,

I'm seeing a case where KVM tools occasionally fails with the following error message: "KVM_GET_SUPPORTED_CPUID failed: Argument list too long", which means that we get -E2BIG back from KVM_GET_SUPPORTED_CPUID.

Why would it happen if we pass KVM_MAX_CPUID_ENTRIES as the max number of entries (in the nent field of struct kvm_cpuid2)?

Also, Why would it happen randomly and not each time the code is run?

Signature · 1 line
Sasha.
#1 lore raw
Quoted 8 lines · Sasha Levin

Hello,

I'm seeing a case where KVM tools occasionally fails with the following error message: "KVM_GET_SUPPORTED_CPUID failed: Argument list too long", which means that we get -E2BIG back from KVM_GET_SUPPORTED_CPUID.

Why would it happen if we pass KVM_MAX_CPUID_ENTRIES as the max number of entries (in the nent field of struct kvm_cpuid2)?

KVM_MAX_CPUID_ENTRIES is a private define, not exported to userspace (since it can change).

Quoted 1 line

Also, Why would it happen randomly and not each time the code is run?

Probably you have some bug. E2BIG is returned when nent is smaller than the number of entries returned (which only depends on the host cpu type).

Signature · 1 line
error compiling committee.c: too many arguments to function