From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Carlo Marcelo Arenas Belon
<carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] Abort if gcc4 was used to compile qemu and kvm is not enabled
Date: Mon, 08 Oct 2007 10:53:52 -0500 [thread overview]
Message-ID: <470A5290.4040504@codemonkey.ws> (raw)
In-Reply-To: <20071008154402.GB2137@tapir>
Carlo Marcelo Arenas Belon wrote:
> Using gcc4 to compile qemu will generate broken code for its cpu emulation
> but should be fine if using kvm only.
>
> This will allow users that have no access to gcc4 on their platforms to at
> least get kvm compiled and use it while preventing them to run a broken
> qemu if kvm is not available.
>
This is a pretty bad thing IMHO. There are other patches out there that
allow QEMU (even with -no-kvm) to work with GCC4. A random check like
this is going to result in difficulties down the road. Maybe a release
of GCC4 will allow QEMU to work in the future. A check like this is
just way too general IMHO.
If you're going to do anything, a firm warning when compiling with a
GCC4 override would be the best thing.
Regards,
Anthony Liguori
> This is not meant to be used in the long run when a solution to qemu's use
> of gcc-3.x for code generation is finally resolved upstream, which is why
> it is kept inside the KVM specific sections of the code only.
>
> Signed-off-by: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
> ---
> qemu/vl.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/qemu/vl.c b/qemu/vl.c
> index 634fb34..549f008 100644
> --- a/qemu/vl.c
> +++ b/qemu/vl.c
> @@ -8425,8 +8425,13 @@ int main(int argc, char **argv)
> #endif
> #ifdef USE_KVM
> case QEMU_OPTION_no_kvm:
> +#if __GNUC__ >= 4
> + fprintf(stderr, "Can't run without kvm if compiled with gcc4\n");
> + exit(1);
> +#else
> kvm_allowed = 0;
> break;
> +#endif
> case QEMU_OPTION_no_kvm_irqchip:
> kvm_irqchip = 0;
> break;
> @@ -8559,8 +8564,13 @@ int main(int argc, char **argv)
> #if USE_KVM
> if (kvm_allowed) {
> if (kvm_qemu_init() < 0) {
> +#if __GNUC__ >= 4
> + fprintf(stderr, "Could not initialize KVM, can't run without kvm if compiled with gcc4\n");
> + exit(1);
> +#else
> fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
> kvm_allowed = 0;
> +#endif
> }
> }
> #endif
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-10-08 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 15:44 [PATCH] Abort if gcc4 was used to compile qemu and kvm is not enabled Carlo Marcelo Arenas Belon
2007-10-08 15:53 ` Anthony Liguori [this message]
[not found] ` <470A5290.4040504-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-08 18:45 ` Byron Stanoszek
[not found] ` <Pine.LNX.4.64.0710081411160.27239-4mf1WHGLwUrYtjvyW6yDsg@public.gmane.org>
2007-10-08 19:29 ` Anthony Liguori
[not found] ` <470A851C.3050602-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-09 6:46 ` Carlo Marcelo Arenas Belon
2007-10-09 14:53 ` Anthony Liguori
2007-10-09 13:28 ` Avi Kivity
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=470A5290.4040504@codemonkey.ws \
--to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
--cc=carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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