From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUH3b-0003Lp-Gl for qemu-devel@nongnu.org; Mon, 22 Apr 2013 09:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUH3X-0003hN-4c for qemu-devel@nongnu.org; Mon, 22 Apr 2013 09:45:23 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58613 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUH3W-0003hD-RC for qemu-devel@nongnu.org; Mon, 22 Apr 2013 09:45:19 -0400 Message-ID: <51753EEE.8050508@suse.de> Date: Mon, 22 Apr 2013 15:45:18 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <347514830.2215964.1366237560191.JavaMail.root@redhat.com> <1366259030-13576-1-git-send-email-imammedo@redhat.com> <20130418142409.GB2900@otherpad.lan.raisama.net> In-Reply-To: <20130418142409.GB2900@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 01/16 v2] cpu: make kvm-stub.o a part of CPU library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , pbonzini@redhat.com, Gleb Natapov Cc: aliguori@us.ibm.com, Eduardo Habkost , qemu-devel@nongnu.org Am 18.04.2013 16:24, schrieb Eduardo Habkost: > On Thu, Apr 18, 2013 at 06:23:50AM +0200, Igor Mammedov wrote: >> Signed-off-by: Igor Mammedov >=20 > Reviewed-by: Eduardo Habkost Looks good to me, too. Paolo and Gleb, are you okay with this disguised v5? Andreas >> --- >> v3: >> put ifndef around msi.h in kvm-stub.c instead of in msi.h >> >> v2: >> remove unnecessary kvm-stub.o from "System emulator target" section >> --- >> Makefile.target | 14 +++++++------- >> include/sysemu/kvm.h | 4 ++-- >> kvm-stub.c | 7 ++++++- >> 3 files changed, 15 insertions(+), 10 deletions(-) >> >> diff --git a/Makefile.target b/Makefile.target >> index 2bd6d14..9bde8e5 100644 >> --- a/Makefile.target >> +++ b/Makefile.target >> @@ -64,6 +64,12 @@ all: $(PROGS) stap >> # Dummy command so that make thinks it has done something >> @true >> =20 >> +CONFIG_NO_PCI =3D $(if $(subst n,,$(CONFIG_PCI)),n,y) >> +CONFIG_NO_KVM =3D $(if $(subst n,,$(CONFIG_KVM)),n,y) >> +CONFIG_NO_XEN =3D $(if $(subst n,,$(CONFIG_XEN)),n,y) >> +CONFIG_NO_GET_MEMORY_MAPPING =3D $(if $(subst n,,$(CONFIG_HAVE_GET_ME= MORY_MAPPING)),n,y) >> +CONFIG_NO_CORE_DUMP =3D $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y= ) >> + >> ######################################################### >> # cpu emulator library >> obj-y =3D exec.o translate-all.o cpu-exec.o >> @@ -74,6 +80,7 @@ obj-y +=3D fpu/softfloat.o >> obj-y +=3D target-$(TARGET_BASE_ARCH)/ >> obj-y +=3D disas.o >> obj-$(CONFIG_GDBSTUB_XML) +=3D gdbstub-xml.o >> +obj-$(CONFIG_NO_KVM) +=3D kvm-stub.o >> =20 >> ######################################################### >> # Linux user emulator target >> @@ -102,18 +109,11 @@ endif #CONFIG_BSD_USER >> ######################################################### >> # System emulator target >> ifdef CONFIG_SOFTMMU >> -CONFIG_NO_PCI =3D $(if $(subst n,,$(CONFIG_PCI)),n,y) >> -CONFIG_NO_KVM =3D $(if $(subst n,,$(CONFIG_KVM)),n,y) >> -CONFIG_NO_XEN =3D $(if $(subst n,,$(CONFIG_XEN)),n,y) >> -CONFIG_NO_GET_MEMORY_MAPPING =3D $(if $(subst n,,$(CONFIG_HAVE_GET_ME= MORY_MAPPING)),n,y) >> -CONFIG_NO_CORE_DUMP =3D $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y= ) >> - >> obj-y +=3D arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o >> obj-y +=3D qtest.o >> obj-y +=3D hw/ >> obj-$(CONFIG_FDT) +=3D device_tree.o >> obj-$(CONFIG_KVM) +=3D kvm-all.o >> -obj-$(CONFIG_NO_KVM) +=3D kvm-stub.o >> obj-y +=3D memory.o savevm.o cputlb.o >> obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) +=3D memory_mapping.o >> obj-$(CONFIG_HAVE_CORE_DUMP) +=3D dump.o >> 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 >> =20 >> +void kvm_setup_guest_memory(void *start, size_t size); >> void kvm_flush_coalesced_mmio_buffer(void); >> -#endif >> =20 >> int kvm_insert_breakpoint(CPUArchState *current_env, target_ulong add= r, >> target_ulong len, int type); >> diff --git a/kvm-stub.c b/kvm-stub.c >> index 3e5c201..e5d2906 100644 >> --- a/kvm-stub.c >> +++ b/kvm-stub.c >> @@ -12,11 +12,14 @@ >> =20 >> #include "qemu-common.h" >> #include "hw/hw.h" >> -#include "hw/pci/msi.h" >> #include "cpu.h" >> #include "exec/gdbstub.h" >> #include "sysemu/kvm.h" >> =20 >> +#ifndef CONFIG_USER_ONLY >> +#include "hw/pci/msi.h" >> +#endif >> + >> KVMState *kvm_state; >> bool kvm_kernel_irqchip; >> bool kvm_async_interrupts_allowed; >> @@ -122,6 +125,7 @@ int kvm_on_sigbus(int code, void *addr) >> return 1; >> } >> =20 >> +#ifndef CONFIG_USER_ONLY >> int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg) >> { >> return -ENOSYS; >> @@ -145,3 +149,4 @@ int kvm_irqchip_remove_irqfd_notifier(KVMState *s,= EventNotifier *n, int virq) >> { >> return -ENOSYS; >> } >> +#endif >> --=20 >> 1.8.2 >> >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg