From: Gleb Natapov <gleb@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
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, 8 Apr 2013 20:07:03 +0300 [thread overview]
Message-ID: <20130408170703.GC15035@redhat.com> (raw)
In-Reply-To: <5162D5FF.8040800@suse.de>
On Mon, Apr 08, 2013 at 04:36:47PM +0200, Andreas Färber wrote:
> Am 08.04.2013 14:19, schrieb Gleb Natapov:
> > On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote:
> >>> static void kvm_sw_tlb_put(PowerPCCPU *cpu)
> >>> {
> >>> CPUPPCState *env = &cpu->env;
> >>> diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
> >>> index 23fe51f..6321384 100644
> >>> --- a/target-s390x/cpu.c
> >>> +++ b/target-s390x/cpu.c
> >>> @@ -84,6 +84,10 @@ static void s390_cpu_reset(CPUState *s)
> >>> * after incrementing the cpu counter */
> >>> #if !defined(CONFIG_USER_ONLY)
> >>> s->halted = 1;
> >>> +
> >>> + if (kvm_enabled()) {
> >>> + kvm_arch_reset_vcpu(s);
> >> Does this compile with kvm support disabled?
> >>
> > 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.
>
> No, we had a previous case where --enable-debug broke if (kvm_enabled())
> {...} but regular builds worked.
>
Can you recall what compiler was it with? 4.7.2 works with -O0.
--
Gleb.
next prev parent reply other threads:[~2013-04-08 17:07 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
2013-04-08 14:36 ` Andreas Färber
2013-04-08 17:07 ` Gleb Natapov [this message]
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=20130408170703.GC15035@redhat.com \
--to=gleb@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@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).