[libvirt] [PATCH] kvm: maxVCPU runtime detection

Guido Günther agx at sigxcpu.org
Fri Aug 29 21:33:35 UTC 2008


Hi,
On Fri, Aug 22, 2008 at 02:27:58PM +0100, Daniel P. Berrange wrote:
> On Fri, Aug 22, 2008 at 03:16:42PM +0200, Guido G?nther wrote:
> > Hi,
> > with recent linux kernels we can detect the maximum number of virtual
> > cpus at runtime via an ioctl. Possible patch attached. It does this on
> > every call to qemudGetMaxVCPUs. Would you prefer something that does
> > this only once in qemudStartup()?
> > Cheers,
> >  -- Guido
> 
> >  
> > +dnl
> > +dnl check for kvm headers
> > +dnl
> > +AC_CHECK_HEADERS([linux/kvm.h])
> 
> Hmm, I wonder if that's commonly installed by Fedora/Debian RPMs
> for KVM....
> 
> It might be neccessary to just #define the IOCTL constant in
> our own header files if its not available.
Attached patch adds the missing definitions via qemu_driver.h which
seemed close enough to KVM and isn't a public header. This way all
#ifdefs' moved out of qemu_driver.c.
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-for-kvm-determine-maxVCPUs-at-runtime.patch
Type: text/x-diff
Size: 2724 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080829/1e56806a/attachment-0001.bin>


More information about the libvir-list mailing list