IIRC, during guest creation time qemu will check the host supported
VCPUS count. If count is greater than KVM_MAX_VCPUS then it will
fail to launch guest (or fail to hot plug vcpus). In other words, the
number of vcpus in a KVM guest will never to > KVM_MAX_VCPUS.
Am I missing something ?
KVM_MAX_VCPUS is a definition for use in the *host*, it's even defined
in kvm_host.h. ÂThe guest's pvclock code won't get magically recompiled
if KVM_MAX_VCPUS is changed in the host. ÂKVM_MAX_VCPUS is an arbitrary
value in the sense that there isn't a fundamental hard limit, i.e. the
value can be changed, either for a custom KVM build or in mainline,
e.g. it was bumped in 2016: