From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method
Date: Mon, 08 Apr 2013 15:43:39 +0200 [thread overview]
Message-ID: <5162C98B.1090501@redhat.com> (raw)
In-Reply-To: <20130408121950.GA9425@redhat.com>
Il 08/04/2013 14:19, Gleb Natapov ha scritto:
>> > Does this compile with kvm support disabled?
Oops, sorry, I thought I had replied to this email (with "hmm, let me
check").
> Well, it does not:
> CC s390x-softmmu/target-s390x/cpu.o
> /users/gleb/work/qemu/target-s390x/cpu.c: In function 's390_cpu_reset':
> /users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: implicit
> declaration of function 'kvm_arch_reset_vcpu'
> [-Werror=implicit-function-declaration]
> /users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: nested extern
> declaration of 'kvm_arch_reset_vcpu' [-Werror=nested-externs]
> cc1: all warnings being treated as errors
>
> I wonder if it is portable between compilers to rely on code in if(0){} to
> be dropped in all levels of optimizations.
It generally is okay to assume it (I think early GCC 3.x releases had no
-O0 dead-code optimization, but it was a long time ago). However:
* in QEMU only some files have kvm_enabled() as 0 when KVM is disabled.
Files that are shared among multiple targets have it defined to
kvm_allowed. This is not the problem here.
* you still need to define the prototypes for anything you call, of course.
Paolo
next prev parent reply other threads:[~2013-04-08 13:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 20:37 [Qemu-devel] [PATCH uq/master v2 0/2] correctly reset the CPU on INIT interrupts Paolo Bonzini
2013-03-22 20:37 ` [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method Paolo Bonzini
2013-04-02 13:29 ` Gleb Natapov
2013-04-08 12:19 ` Gleb Natapov
2013-04-08 13:43 ` Paolo Bonzini [this message]
2013-04-08 14:36 ` Andreas Färber
2013-04-08 17:07 ` Gleb Natapov
2013-03-22 20:37 ` [Qemu-devel] [PATCH uq/master v2 2/2] kvm: forward INIT signals coming from the chipset Paolo Bonzini
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=5162C98B.1090501@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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).