From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USanq-0005ww-FT for qemu-devel@nongnu.org; Wed, 17 Apr 2013 18:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USanp-0008LI-Gg for qemu-devel@nongnu.org; Wed, 17 Apr 2013 18:26:10 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:47601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USanp-0008LD-8C for qemu-devel@nongnu.org; Wed, 17 Apr 2013 18:26:09 -0400 Date: Wed, 17 Apr 2013 18:26:00 -0400 (EDT) From: Paolo Bonzini Message-ID: <347514830.2215964.1366237560191.JavaMail.root@redhat.com> In-Reply-To: <20130417185844.GA11821@otherpad.lan.raisama.net> References: <1366063976-4909-1-git-send-email-imammedo@redhat.com> <1366063976-4909-2-git-send-email-imammedo@redhat.com> <20130417185844.GA11821@otherpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/16] cpu: make kvm-stub.o a part of CPU library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, mst@redhat.com, jan kiszka , claudio fontana , qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang z zhang , Igor Mammedov , afaerber@suse.de, lig fnst , rth@twiddle.net > > +#ifndef CONFIG_USER_ONLY > > #include "qemu-common.h" > > #include "hw/pci/pci.h" > > > > @@ -47,4 +48,5 @@ static inline bool msi_present(const PCIDevice *dev) > > return dev->cap_present & QEMU_PCI_CAP_MSI; > > } > > > > +#endif Please put the #ifndef in the .c file instead. Paolo > > #endif /* QEMU_MSI_H */ > > diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h > > index 495e6f8..93cef28 100644 > > --- a/include/sysemu/kvm.h > > +++ b/include/sysemu/kvm.h > > @@ -144,10 +144,10 @@ int kvm_cpu_exec(CPUArchState *env); > > #if !defined(CONFIG_USER_ONLY) > > void *kvm_vmalloc(ram_addr_t size); > > void *kvm_arch_vmalloc(ram_addr_t size); > > -void kvm_setup_guest_memory(void *start, size_t size); > > +#endif > > > > +void kvm_setup_guest_memory(void *start, size_t size); > > void kvm_flush_coalesced_mmio_buffer(void); > > -#endif > > > > int kvm_insert_breakpoint(CPUArchState *current_env, target_ulong addr, > > target_ulong len, int type); > > diff --git a/kvm-stub.c b/kvm-stub.c > > index 3e5c201..a131305 100644 > > --- a/kvm-stub.c > > +++ b/kvm-stub.c > > @@ -122,6 +122,7 @@ int kvm_on_sigbus(int code, void *addr) > > return 1; > > } > > > > +#ifndef CONFIG_USER_ONLY > > int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg) > > { > > return -ENOSYS; > > @@ -145,3 +146,4 @@ int kvm_irqchip_remove_irqfd_notifier(KVMState *s, > > EventNotifier *n, int virq) > > { > > return -ENOSYS; > > } > > +#endif > > -- > > 1.8.2 > > > > > > -- > Eduardo >