kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: Q: status of kvm/ subdir in qemu-kvm tarball?
Date: Wed, 23 Feb 2011 17:30:53 +0300	[thread overview]
Message-ID: <4D651A1D.8030206@msgid.tls.msk.ru> (raw)
In-Reply-To: <4D650F85.10502@siemens.com>

23.02.2011 16:45, Jan Kiszka wrote:
> On 2011-02-23 14:15, Michael Tokarev wrote:
[]
>> It only matters if you want to build qemu-kvm for OLDER
>> kernel without support of some features which are used by
>> the userspace you're building.  Provided 3 things:
> 
> It also matters if you are building for a kernel more recent than the
> headers you have (wherever they came from). Think of the scenario that
> you build a recent customized kernel for you host. Then you also need to
> remember running "make header_install" and picking up those headers for
> the qemu build.

Um. We're going in circles :)

I mean, qemu userspace does not need kernels more recent
than it can understand.  So there's no need to use
external headers instead of using a copy embedded in
the tarball - which may be not up-to-date wrt currently
running kernel or currently installed headers, but the
extra features available there wont be used anyway since
that particular qemu userspace does not understand them
anyway.

The only situation where using kernel headers not provided
by qemu itself is when you want to build qemu for older
kernel and omit some features and runtime tests.  But this
is hardly a good goal to support.

For the above scenario (installing a custom very recent
kernel but forgetting to run `make header_install') to
be of any use, you also need qemu userspace that is
able to use the new feature in this shiny new kernel.

So to sum it up, we've two options (actually 3, but
3rd isn't very interesting):

 1) embed "recent enough" (for this version of qemu)
  kernel headers and always use this copy, or

 2) use system headers and always assume all features
  we actually understand are present in there, and
  fail if they're not.  This can be a configure-time
  check (it already is, sort of), so configure can
  tell the user the minimum required version to
  install.

I've no preference for either of the two, first is
more convinient and second has less duplicates.

(By "qemu" I mean either qemu or qemu-kvm, since the
 two tries to become the same thing)

[]
>> Does qemu[-kvm] want to stay compatible with older kernels,
>> or kernel headers?  If yes, how old is old?
> 
> Our current minimum requirement is the KVM ABI provided by 2.6.29. The
> runtime check is detecting this via the existence of certain key
> capabilities. The related build-time check takes place during configure,
> probing a list of minimally required KVM_CAPs.
> 
> This last check would become obsolete if we always pick the headers from
> a qemu-local copy. Furthermore, we could drop "#ifdef KVM_CAP" around
> features that are more recent than our kernel baseline. Runtime checking
> will still be required, of course.

That check is useful to error out and tell user if the minimum
requiriment is not satisfied.  Keeping lots of ifdefs isn't useful
IMHO.

So I'd say keep --with-kernelheaders, keep the checks in configure
(maybe activate them if --with-kernelheaders is specified), keep
local kernel headers which are recent enough, and remove irrelevant
#ifdefs around new API.

I'm not sure again I understand your statement about removing
#ifdefs in the previous email -- now you say you verified that
all #ifdefs are needed.  They're either needed or can be removed... ;)

But that all went quite far away from dropping old cruft from
kvm/ subdir - as we found out, there are 2 useful pieces in
there, kvm_stat helper and kernel headers, so let's keep them
for now and remove the rest.

Anyway, that's quite long "discussion" about nearly nothing... :)

Thanks!

/mjt

  reply	other threads:[~2011-02-23 14:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 11:04 Q: status of kvm/ subdir in qemu-kvm tarball? Michael Tokarev
2011-02-23 11:31 ` Jan Kiszka
2011-02-23 11:42   ` Michael Tokarev
2011-02-23 12:58     ` Jan Kiszka
2011-02-23 13:15       ` Michael Tokarev
2011-02-23 13:45         ` Jan Kiszka
2011-02-23 14:30           ` Michael Tokarev [this message]
2011-02-23 14:57             ` Jan Kiszka
2011-02-27 16:28               ` Avi Kivity
2011-02-27 18:36                 ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D651A1D.8030206@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).