qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [6684] Fix "info registers" under kvm.


From: Blue Swirl
Subject: Re: [Qemu-devel] Re: [6684] Fix "info registers" under kvm.
Date: Sun, 8 Mar 2009 18:36:19 +0200

On 3/8/09, Avi Kivity <address@hidden> wrote:
> Avi Kivity wrote:
>
> > Jan Kiszka wrote:
> >
> > > I'm just still waiting for a reply from Anthony on how to embed best all
> > > the "if (kvm_enabled()) foo();" patterns [2]. That would also allow us
> > > to merge gdbstub support for upstream kvm.
> > >
> > >
> > >
> >
> > Wouldn't 'if (!kvm_enabled()) return;' inside the callees suffice?
> >
>
>  Rather,
>
>  static inline void kvm_foo(...)
>  {
>    if (!kvm_enabled()) {
>        return;
>    }
>
>  #ifdef CONFIG_KVM
>   kvm_do_foo();
>  #endif
>
>  }

kvm_foo may then be unused and produce warnings unless also hidden
with #ifdef CONFIG_KVM.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]