All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, aliguori@us.ibm.com
Subject: Re: [PATCH 2/2] fix compilation with --disable-kvm
Date: Thu, 02 Oct 2008 16:43:06 +0300	[thread overview]
Message-ID: <48E4CFEA.7060906@redhat.com> (raw)
In-Reply-To: <1222951797-9717-3-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
>  
> -    kvm_save_registers(mon_cpu);
> +    if (kvm_enabled())
> +        kvm_save_registers(mon_cpu);
>  
>   

If I'm not mistaken, this relies on the optimizer to remove the call to 
kvm_save_registers().  Compilation with -O0 will break.

I think a better solution is to have kvm_save_registers() contain the 
kvm_enabled() check, and also be defined to an empty function if kvm is 
disabled at compile time.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2008-10-02 13:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 12:49 [PATCH 0/2] KVM failing to compile with --disable-kvm Glauber Costa
2008-10-02 12:49 ` [PATCH 1/2] provide a kvm_qemu_memory_alias() function Glauber Costa
2008-10-02 12:49 ` [PATCH 2/2] fix compilation with --disable-kvm Glauber Costa
2008-10-02 13:43   ` Avi Kivity [this message]
2008-10-02 13:46     ` Glauber Costa
2008-10-02 13:55       ` Avi Kivity
2008-10-02 13:40 ` [PATCH 0/2] KVM failing to compile " 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=48E4CFEA.7060906@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.