* Installing kernel headers in kvm-kmod
@ 2009-12-10 13:07 Anthony Liguori
2009-12-10 13:12 ` Avi Kivity
2009-12-10 13:35 ` Jan Kiszka
0 siblings, 2 replies; 13+ messages in thread
From: Anthony Liguori @ 2009-12-10 13:07 UTC (permalink / raw)
To: Avi Kivity, Jan Kiszka, Marcelo Tosatti, kvm-devel
QEMU 0.12.0-rc1 does not support KVM
https://bugs.launchpad.net/bugs/494500
Boils down to the fact that 1) we don't include kernel headers in qemu (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers on make install.
I think we've discussed (2) as being the preferred solution. Does everyone agree with that? Anyone care to volunteer to make the change? :-)
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 13:07 Installing kernel headers in kvm-kmod Anthony Liguori
@ 2009-12-10 13:12 ` Avi Kivity
2009-12-10 13:35 ` Jan Kiszka
1 sibling, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2009-12-10 13:12 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Jan Kiszka, Marcelo Tosatti, kvm-devel
On 12/10/2009 03:07 PM, Anthony Liguori wrote:
> QEMU 0.12.0-rc1 does not support KVM
> https://bugs.launchpad.net/bugs/494500
>
> Boils down to the fact that 1) we don't include kernel headers in qemu
> (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
> on make install.
>
> I think we've discussed (2) as being the preferred solution. Does
> everyone agree with that? Anyone care to volunteer to make the
> change? :-)
>
While I definitely agree with (2), for the bug you cite Ubuntu should
backport KVM_CAP_DESTROY_MEMORY_REGION_WORKS to their kernel (and
headers). Distributions shouldn't require kvm-kmod.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 13:07 Installing kernel headers in kvm-kmod Anthony Liguori
2009-12-10 13:12 ` Avi Kivity
@ 2009-12-10 13:35 ` Jan Kiszka
2009-12-10 14:50 ` Arnd Bergmann
1 sibling, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-12-10 13:35 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Avi Kivity, Marcelo Tosatti, kvm-devel
Anthony Liguori wrote:
> QEMU 0.12.0-rc1 does not support KVM
> https://bugs.launchpad.net/bugs/494500
>
> Boils down to the fact that 1) we don't include kernel headers in qemu
> (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
> on make install.
>
> I think we've discussed (2) as being the preferred solution. Does
> everyone agree with that? Anyone care to volunteer to make the change? :-)
>
I've pushed a half-tested approach into kvm-kmod's next branch. Feel
free to test/fix/enhance it.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 13:35 ` Jan Kiszka
@ 2009-12-10 14:50 ` Arnd Bergmann
2009-12-10 15:01 ` Avi Kivity
2009-12-10 15:01 ` Jan Kiszka
0 siblings, 2 replies; 13+ messages in thread
From: Arnd Bergmann @ 2009-12-10 14:50 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, Avi Kivity, Marcelo Tosatti, kvm-devel
On Thursday 10 December 2009, Jan Kiszka wrote:
> Anthony Liguori wrote:
> > QEMU 0.12.0-rc1 does not support KVM
> > https://bugs.launchpad.net/bugs/494500
> >
> > Boils down to the fact that 1) we don't include kernel headers in qemu
> > (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
> > on make install.
> >
> > I think we've discussed (2) as being the preferred solution. Does
> > everyone agree with that? Anyone care to volunteer to make the change? :-)
> >
> I've pushed a half-tested approach into kvm-kmod's next branch. Feel
> free to test/fix/enhance it.
This would work, but installing to /usr/include/linux/kvm.h will confuse
distro package managers a lot, because that location belongs to the glibc
or libc-linux-headers or some other package already.
If you want to install the headers from kvm-kmod, I would recommend
doing it in a different path, e.g. /usr/include/kvm-kmod/{linux,asm}.
qemu can then add -I/usr/include/kvm-kmod to it's default include
path and get the kvm-kmod version if that's installed or the distro
version otherwise.
It may also be useful to do the equivalent of 'make headers_install'
from the kernel, to remove all "#ifdef __KERNEL__" sections and
sparse annotations from the header files, but it should also work
without that.
Arnd
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 14:50 ` Arnd Bergmann
@ 2009-12-10 15:01 ` Avi Kivity
2009-12-10 15:25 ` Arnd Bergmann
2009-12-10 21:44 ` Anthony Liguori
2009-12-10 15:01 ` Jan Kiszka
1 sibling, 2 replies; 13+ messages in thread
From: Avi Kivity @ 2009-12-10 15:01 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jan Kiszka, Anthony Liguori, Marcelo Tosatti, kvm-devel
On 12/10/2009 04:50 PM, Arnd Bergmann wrote:
> On Thursday 10 December 2009, Jan Kiszka wrote:
>
>> Anthony Liguori wrote:
>>
>>> QEMU 0.12.0-rc1 does not support KVM
>>> https://bugs.launchpad.net/bugs/494500
>>>
>>> Boils down to the fact that 1) we don't include kernel headers in qemu
>>> (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
>>> on make install.
>>>
>>> I think we've discussed (2) as being the preferred solution. Does
>>> everyone agree with that? Anyone care to volunteer to make the change? :-)
>>>
>>>
>> I've pushed a half-tested approach into kvm-kmod's next branch. Feel
>> free to test/fix/enhance it.
>>
> This would work, but installing to /usr/include/linux/kvm.h will confuse
> distro package managers a lot, because that location belongs to the glibc
> or libc-linux-headers or some other package already.
>
> If you want to install the headers from kvm-kmod, I would recommend
> doing it in a different path, e.g. /usr/include/kvm-kmod/{linux,asm}.
>
Maybe even /usr/local/include/kvm-kmod-$version/...., and a symlink
/usr/local/include/kvm-kmod.
> qemu can then add -I/usr/include/kvm-kmod to it's default include
> path and get the kvm-kmod version if that's installed or the distro
> version otherwise.
>
> It may also be useful to do the equivalent of 'make headers_install'
> from the kernel, to remove all "#ifdef __KERNEL__" sections and
> sparse annotations from the header files, but it should also work
> without that.
>
Well, qemu.git needs __user removed.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 14:50 ` Arnd Bergmann
2009-12-10 15:01 ` Avi Kivity
@ 2009-12-10 15:01 ` Jan Kiszka
1 sibling, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2009-12-10 15:01 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Anthony Liguori, Avi Kivity, Marcelo Tosatti, kvm-devel
Arnd Bergmann wrote:
> On Thursday 10 December 2009, Jan Kiszka wrote:
>> Anthony Liguori wrote:
>>> QEMU 0.12.0-rc1 does not support KVM
>>> https://bugs.launchpad.net/bugs/494500
>>>
>>> Boils down to the fact that 1) we don't include kernel headers in qemu
>>> (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
>>> on make install.
>>>
>>> I think we've discussed (2) as being the preferred solution. Does
>>> everyone agree with that? Anyone care to volunteer to make the change? :-)
>>>
>> I've pushed a half-tested approach into kvm-kmod's next branch. Feel
>> free to test/fix/enhance it.
>
> This would work, but installing to /usr/include/linux/kvm.h will confuse
> distro package managers a lot, because that location belongs to the glibc
> or libc-linux-headers or some other package already.
>
> If you want to install the headers from kvm-kmod, I would recommend
> doing it in a different path, e.g. /usr/include/kvm-kmod/{linux,asm}.
> qemu can then add -I/usr/include/kvm-kmod to it's default include
> path and get the kvm-kmod version if that's installed or the distro
> version otherwise.
Good point. /usr/include/kvm-kmod would be ok for me unless someone
wants them elsewhere.
>
> It may also be useful to do the equivalent of 'make headers_install'
> from the kernel, to remove all "#ifdef __KERNEL__" sections and
> sparse annotations from the header files, but it should also work
> without that.
Yes, I think it's better to let the sync source install those headers
for us, then pick up those cleaned versions, carry them in kvm-kmod in
addition to the existing ones and finally install them.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 15:01 ` Avi Kivity
@ 2009-12-10 15:25 ` Arnd Bergmann
2009-12-10 16:42 ` Jan Kiszka
2009-12-10 21:44 ` Anthony Liguori
1 sibling, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2009-12-10 15:25 UTC (permalink / raw)
To: Avi Kivity; +Cc: Jan Kiszka, Anthony Liguori, Marcelo Tosatti, kvm-devel
On Thursday 10 December 2009, Avi Kivity wrote:
> Maybe even /usr/local/include/kvm-kmod-$version/...., and a symlink
> /usr/local/include/kvm-kmod.
Depends on how fine-grained you want to do the packaging.
Most distributions split packages between code and development
packages. The kvm-kmod code is the kernel module, so you want
to be able to install it for multiple kernels simultaneously.
Building the package only requires one version of the header
and does not depend on the underlying kernel version, only
on the version of the module, so it's reasonable to install only
one version as the -dev package, and have a dependency
in there to match the module version with the header version.
The most complex setup would split the development package
into one per kernel version and/or module version, plus an
extra package for the module version containing only the
symlink. I wouldn't go there.
> > It may also be useful to do the equivalent of 'make headers_install'
> > from the kernel, to remove all "#ifdef __KERNEL__" sections and
> > sparse annotations from the header files, but it should also work
> > without that.
> >
>
> Well, qemu.git needs __user removed.
This one is taken care of by kvm_kmod in the sync script, though it
would be cleaner to only do it for the installed version of the header,
not for the one used to build kvm.ko.
Arnd <><
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 15:25 ` Arnd Bergmann
@ 2009-12-10 16:42 ` Jan Kiszka
2009-12-10 16:44 ` Avi Kivity
0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-12-10 16:42 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Avi Kivity, Anthony Liguori, Marcelo Tosatti, kvm-devel
Arnd Bergmann wrote:
> On Thursday 10 December 2009, Avi Kivity wrote:
>> Maybe even /usr/local/include/kvm-kmod-$version/...., and a symlink
>> /usr/local/include/kvm-kmod.
>
> Depends on how fine-grained you want to do the packaging.
> Most distributions split packages between code and development
> packages. The kvm-kmod code is the kernel module, so you want
> to be able to install it for multiple kernels simultaneously.
>
> Building the package only requires one version of the header
> and does not depend on the underlying kernel version, only
> on the version of the module, so it's reasonable to install only
> one version as the -dev package, and have a dependency
> in there to match the module version with the header version.
>
> The most complex setup would split the development package
> into one per kernel version and/or module version, plus an
> extra package for the module version containing only the
> symlink. I wouldn't go there.
I've just (forced-)pushed the "simple" version with
/usr/include/kvm-kmod as destination. The user headers are now stored
under usr/include in the kvm-kmod sources and installed from there.
>
>>> It may also be useful to do the equivalent of 'make headers_install'
>>> from the kernel, to remove all "#ifdef __KERNEL__" sections and
>>> sparse annotations from the header files, but it should also work
>>> without that.
>>>
>> Well, qemu.git needs __user removed.
>
> This one is taken care of by kvm_kmod in the sync script, though it
> would be cleaner to only do it for the installed version of the header,
> not for the one used to build kvm.ko.
It's easy to drop, but I wonder why it was introduced. To allow reusing
the headers for user space?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 16:42 ` Jan Kiszka
@ 2009-12-10 16:44 ` Avi Kivity
2009-12-10 17:14 ` Jan Kiszka
0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2009-12-10 16:44 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Arnd Bergmann, Anthony Liguori, Marcelo Tosatti, kvm-devel
On 12/10/2009 06:42 PM, Jan Kiszka wrote:
>
> I've just (forced-)pushed the "simple" version with
> /usr/include/kvm-kmod as destination. The user headers are now stored
> under usr/include in the kvm-kmod sources and installed from there.
>
It's customary to install to /usr/local, not to /usr (qemu does the same).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 16:44 ` Avi Kivity
@ 2009-12-10 17:14 ` Jan Kiszka
2009-12-10 20:26 ` Arnd Bergmann
0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-12-10 17:14 UTC (permalink / raw)
To: Avi Kivity; +Cc: Arnd Bergmann, Anthony Liguori, Marcelo Tosatti, kvm-devel
Avi Kivity wrote:
> On 12/10/2009 06:42 PM, Jan Kiszka wrote:
>> I've just (forced-)pushed the "simple" version with
>> /usr/include/kvm-kmod as destination. The user headers are now stored
>> under usr/include in the kvm-kmod sources and installed from there.
>>
>
> It's customary to install to /usr/local, not to /usr (qemu does the same).
Adjusted accordingly. Moreover, I only install the target arch's header now.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 17:14 ` Jan Kiszka
@ 2009-12-10 20:26 ` Arnd Bergmann
2009-12-10 20:36 ` Avi Kivity
0 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2009-12-10 20:26 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, Anthony Liguori, Marcelo Tosatti, kvm-devel
On Thursday 10 December 2009 17:14:40 Jan Kiszka wrote:
> Avi Kivity wrote:
> > On 12/10/2009 06:42 PM, Jan Kiszka wrote:
> >> I've just (forced-)pushed the "simple" version with
> >> /usr/include/kvm-kmod as destination. The user headers are now stored
> >> under usr/include in the kvm-kmod sources and installed from there.
> >>
> >
> > It's customary to install to /usr/local, not to /usr (qemu does the same).
Right. Specifically, an install from source should go to /usr/local/include
by default, while a distro package should override the path to go to
/usr/include, which the current version easily allows.
This also means that qemu will have to look in three places now,
/usr/local/include/kvm-kmod, /usr/include/kvm-kmod and /usr/include.
Adding /usr/local/include probably doesn't hurt but should not be
necessary.
> Adjusted accordingly. Moreover, I only install the target arch's header now.
Looks good now.
Arnd
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 20:26 ` Arnd Bergmann
@ 2009-12-10 20:36 ` Avi Kivity
0 siblings, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2009-12-10 20:36 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jan Kiszka, Anthony Liguori, Marcelo Tosatti, kvm-devel
On 12/10/2009 10:26 PM, Arnd Bergmann wrote:
> On Thursday 10 December 2009 17:14:40 Jan Kiszka wrote:
>
>> Avi Kivity wrote:
>>
>>> On 12/10/2009 06:42 PM, Jan Kiszka wrote:
>>>
>>>> I've just (forced-)pushed the "simple" version with
>>>> /usr/include/kvm-kmod as destination. The user headers are now stored
>>>> under usr/include in the kvm-kmod sources and installed from there.
>>>>
>>>>
>>> It's customary to install to /usr/local, not to /usr (qemu does the same).
>>>
> Right. Specifically, an install from source should go to /usr/local/include
> by default, while a distro package should override the path to go to
> /usr/include, which the current version easily allows.
>
> This also means that qemu will have to look in three places now,
> /usr/local/include/kvm-kmod, /usr/include/kvm-kmod and /usr/include.
> Adding /usr/local/include probably doesn't hurt but should not be
> necessary.
>
The only icky bit is that /usr/local/include/kvm-kmod will stick around
after the user forgets about it and switches to the kernel headers. I
don't see a way around it (it's the generic uninstall problem), so I
think we should just live with it.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Installing kernel headers in kvm-kmod
2009-12-10 15:01 ` Avi Kivity
2009-12-10 15:25 ` Arnd Bergmann
@ 2009-12-10 21:44 ` Anthony Liguori
1 sibling, 0 replies; 13+ messages in thread
From: Anthony Liguori @ 2009-12-10 21:44 UTC (permalink / raw)
To: Avi Kivity; +Cc: Arnd Bergmann, Jan Kiszka, Marcelo Tosatti, kvm-devel
Avi Kivity wrote:
> On 12/10/2009 04:50 PM, Arnd Bergmann wrote:
>> On Thursday 10 December 2009, Jan Kiszka wrote:
>>
>>> Anthony Liguori wrote:
>>>
>>>> QEMU 0.12.0-rc1 does not support KVM
>>>> https://bugs.launchpad.net/bugs/494500
>>>>
>>>> Boils down to the fact that 1) we don't include kernel headers in qemu
>>>> (whereas qemu-kvm does) and 2) kvm-kmod does not install those headers
>>>> on make install.
>>>>
>>>> I think we've discussed (2) as being the preferred solution. Does
>>>> everyone agree with that? Anyone care to volunteer to make the
>>>> change? :-)
>>>>
>>>>
>>> I've pushed a half-tested approach into kvm-kmod's next branch. Feel
>>> free to test/fix/enhance it.
>>>
>> This would work, but installing to /usr/include/linux/kvm.h will confuse
>> distro package managers a lot, because that location belongs to the
>> glibc
>> or libc-linux-headers or some other package already.
>>
>> If you want to install the headers from kvm-kmod, I would recommend
>> doing it in a different path, e.g. /usr/include/kvm-kmod/{linux,asm}.
>>
>
> Maybe even /usr/local/include/kvm-kmod-$version/...., and a symlink
> /usr/local/include/kvm-kmod.
A pkg-config file would be nice. Then we need no symlink. Makes qemu
interaction saner.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-12-10 21:44 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 13:07 Installing kernel headers in kvm-kmod Anthony Liguori
2009-12-10 13:12 ` Avi Kivity
2009-12-10 13:35 ` Jan Kiszka
2009-12-10 14:50 ` Arnd Bergmann
2009-12-10 15:01 ` Avi Kivity
2009-12-10 15:25 ` Arnd Bergmann
2009-12-10 16:42 ` Jan Kiszka
2009-12-10 16:44 ` Avi Kivity
2009-12-10 17:14 ` Jan Kiszka
2009-12-10 20:26 ` Arnd Bergmann
2009-12-10 20:36 ` Avi Kivity
2009-12-10 21:44 ` Anthony Liguori
2009-12-10 15:01 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox