From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>, Mark McLoughlin <markmc@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 1/3] x86: fix warning without CONFIG_KVM
Date: Fri, 14 Nov 2008 03:22:19 +0000 [thread overview]
Message-ID: <20081114032219.GJ2055@shareable.org> (raw)
In-Reply-To: <491C8087.7060302@codemonkey.ws>
Anthony Liguori wrote:
> Jan Kiszka wrote:
> >Isn't it cleaner to provide an empty static inline in the !CONFIG_KVM
> >case? Not all compilers might be smart enough to optimize this function
> >away.
>
> kvm_enabled() is (0) when !CONFIG_KVM so that's why this is a warning
> and not an error. The function call disappears during linking from dead
> code elimination. There is no routine overhead when !CONFIG_KVM.
I think it's in reference to:
> static void host_cpuid(uint32_t function, uint32_t *eax, uint32_t *ebx,
> uint32_t *ecx, uint32_t *edx)
This compiles to an empty function if !CONFIG_KVM. Current GCC will
remove the function call by auto-inlining, but some compilers
(including older GCC) will produce an empty function.
If you're saying !CONFIG_KVM results in the _call_ to host_cpuid()
being removed, I'm thinking that the option to provide the guest with
the same features as the host CPU is still useful if KVM is
disabled... I have a real use-case for this. It's installing some
versions of Windows in a guest, to be used with KVM after
installation, because the install process is more reliable (and
faster!) with KVM disabled but after that it works.
-- Jamie
next prev parent reply other threads:[~2008-11-14 3:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 16:42 [Qemu-devel] [PATCH 1/3] x86: fix warning without CONFIG_KVM Mark McLoughlin
2008-11-13 16:42 ` [Qemu-devel] [PATCH 2/3] dyngen: fix some warnings about unused functions Mark McLoughlin
2008-11-13 16:42 ` [Qemu-devel] [PATCH 3/3] cris: fix a segfault if pflash drive not found Mark McLoughlin
2008-11-13 19:37 ` [Qemu-devel] " Anthony Liguori
2008-11-13 20:57 ` Edgar E. Iglesias
2008-11-13 17:10 ` [Qemu-devel] Re: [PATCH 2/3] dyngen: fix some warnings about unused functions Jan Kiszka
2008-11-13 19:39 ` Anthony Liguori
2008-11-14 15:25 ` Mark McLoughlin
2008-11-13 17:09 ` [Qemu-devel] Re: [PATCH 1/3] x86: fix warning without CONFIG_KVM Jan Kiszka
2008-11-13 19:31 ` Anthony Liguori
2008-11-14 3:22 ` Jamie Lokier [this message]
2008-11-13 19:38 ` Anthony Liguori
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=20081114032219.GJ2055@shareable.org \
--to=jamie@shareable.org \
--cc=jan.kiszka@siemens.com \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.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).