[libvirt] [PATCH] kvm: maxVCPU runtime detection
Guido Günther
agx at sigxcpu.org
Fri Aug 22 18:21:34 UTC 2008
On Fri, Aug 22, 2008 at 07:26:12PM +0200, Jim Meyering wrote:
[..snip..]
> I've just checked up to date rawhide and debian unstable systems.
> Both had this:
>
> $ grep KVM_CHECK_EXTENSION /usr/include/linux/kvm.h
> #define KVM_CHECK_EXTENSION _IO(KVMIO, 0x03)
>
> But rawhide lacks KVM_CAP_NR_VCPUS, while Debian has it.
>
> $ grep -r KVM_CAP_NR_VCPUS /usr/include/linux/kvm.h
> #define KVM_CAP_NR_VCPUS 9 /* returns max vcpus per vm */
Debian has it only in unstable not in testing. That's why I added the
header check as well as the "#if defined(KVM_CAP_NR_VCPUS)" - the code
stays as is for old header files and uses the definition (and therefore
the ioctl) if available.
Rawhide will get the defintion with the next libc header update I guess.
-- Guido
More information about the libvir-list
mailing list