I'd like KVM to be consistent across architectures and have the sameSure, but this is a pretty useless piece of information anyway. As
(similar) meaning for KVM_CAP_NR_VCPUS.
Andrew pointed out, the information is available somewhere else, and
all we need to do is to cap it to the number of supported vcpus, which
is effectively a KVM limitation.
Also, we are talking about representing the architecture to userspace.
No amount of massaging is going to make an arm64 box look like an x86.
"min(num_online_cpus(), kvm_arm_default_max_vcpus())" is probably thewhich I'm keen on avoiding. I'd rather have the kvm and !kvm casesForgive me my (ARM?) ignorance but what would it be then? If we go for
return the same thing.
min(num_online_cpus(), kvm_arm_default_max_vcpus()) in both cases, cat
this can still go above KVM_CAP_MAX_VCPUS after vGIC is created?
right thing in all cases. Yes, KVM_CAP_NR_VCPUS will keep reporting
more than the VM can actually support. But that's why we have
KVM_CAP_MAX_VCPUS, which tells you now many vcpus you can create for a
given configuration.