All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] fix compilation with kvm disabled
Date: Wed, 08 Jul 2009 15:10:24 +0300	[thread overview]
Message-ID: <4A548CB0.50000@redhat.com> (raw)
In-Reply-To: <20090708120958.GW3528@poweredge.glommer>

On 07/08/2009 03:09 PM, Glauber Costa wrote:
>
>> I believe that the right thing to do is to define kvm_enabled as a macro
>> returning 0, and let compiler optimize the code out.
>>      
> that already happens with kvm_enabled().
> I have no idea why the compiler do not rip of code when we also test for
> qemu_kvm_irqchip_in_kernel() or other things.
>
> what we could do, is to only test for qemu_kvm_irqchip_in_kernel(),
> using the hidden assumption that if kvm is not enabled, irqchip tests
> will always return false.
>
> It is a little bit messy, though

We should make the call unconditional and do the 
kvm_enabled/irqchip_in_kernel checks in the kvm-specific function.  This 
way common code is only minimally affected.

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


  reply	other threads:[~2009-07-08 12:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 18:36 [PATCH 0/2] Fix compilation with --disable-kvm Glauber Costa
2009-07-07 18:36 ` [PATCH 1/2] surround kvm function with kvm_enabled Glauber Costa
2009-07-07 18:36   ` [PATCH 2/2] fix compilation with kvm disabled Glauber Costa
2009-07-08  7:59     ` Michael S. Tsirkin
2009-07-08 12:09       ` Glauber Costa
2009-07-08 12:10         ` Avi Kivity [this message]
2009-07-08 12:11       ` Avi Kivity
2009-07-08 12:13         ` Michael S. Tsirkin
2009-07-08 12:20           ` Avi Kivity
2009-07-08 12:20             ` Michael S. Tsirkin
2009-07-09 12:57     ` Michael S. Tsirkin
2009-07-07 18:43 ` [PATCH 0/2] Fix compilation with --disable-kvm Jan Kiszka
2009-07-08 12:14 ` 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=4A548CB0.50000@redhat.com \
    --to=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    /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.