KVM_GET_SUPPORTED_CPUID returning -E2BIG
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.
Quoted 8 lines · Sasha Levin
Hello,
I'm seeing a case where KVM tools occasionally fails with the following error message: "
KVM_GET_SUPPORTED_CPUIDfailed: Argument list too long", which means that we get-E2BIGback fromKVM_GET_SUPPORTED_CPUID.Why would it happen if we pass
KVM_MAX_CPUID_ENTRIESas the max number of entries (in the nent field of structkvm_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