From: "Andreas Färber" <afaerber@suse.de>
To: Gleb Natapov <gleb@redhat.com>, Paolo Bonzini <pbonzini@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 16:36:47 +0200 [thread overview]
Message-ID: <5162D5FF.8040800@suse.de> (raw)
In-Reply-To: <20130408121950.GA9425@redhat.com>
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.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-04-08 14:37 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 [this message]
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=5162D5FF.8040800@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--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).