From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ6mu-0006oR-J6 for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ6mo-0006hy-Pc for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:52 -0400 Received: from [199.232.76.173] (port=50530 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ6mo-0006he-Eg for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42008) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ6mo-0003jb-0j for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:46 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5NEFjId030601 for ; Tue, 23 Jun 2009 10:15:45 -0400 From: quintela@redhat.com Date: Tue, 23 Jun 2009 16:14:06 +0200 Message-Id: <60c5dc4830d076cd7863aa81ab2f70a45a2b84ae.1245764569.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 08/15] add option to disable wmware devices List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juan Quintela From: Juan Quintela Signed-off-by: Juan Quintela --- Makefile.target | 6 ++++-- configure | 15 +++++++++++++++ hw/pc.c | 4 ++++ hw/pckbd.c | 4 ++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Makefile.target b/Makefile.target index 878294d..55575a1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -588,8 +588,10 @@ OBJS+= cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o ifdef CONFIG_USB OBJS+= usb-uhci.o endif -OBJS+= vmmouse.o vmport.o vmware_vga.o hpet.o -OBJS += device-hotplug.o pci-hotplug.o smbios.o +ifdef CONFIG_VMWARE +OBJS+= vmmouse.o vmport.o vmware_vga.o +endif +OBJS+= device-hotplug.o pci-hotplug.o smbios.o hpet.o CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif ifeq ($(TARGET_BASE_ARCH), ppc) diff --git a/configure b/configure index 4a1fb45..5554934 100755 --- a/configure +++ b/configure @@ -194,6 +194,7 @@ kvm="no" usb="yes" smb="yes" scsi="yes" +vmware="no" kerneldir="" aix="no" blobs="yes" @@ -340,6 +341,12 @@ fi ;; esac +case $cpu in +i386|x86_64) +vmware="yes" +;; +esac + if [ "$bsd" = "yes" ] ; then if [ "$darwin" != "yes" ] ; then make="gmake" @@ -445,6 +452,8 @@ for opt do ;; --disable-scsi) scsi="no" ;; + --disable-vmware) vmware="no" + ;; --disable-kvm) kvm="no" ;; --enable-profiler) profiler="yes" @@ -639,6 +648,7 @@ echo " --disable-bluez disable bluez stack connectivity" echo " --disable-usb disable usb stack connectivity" echo " --disable-smb disable smb directories support" echo " --disable-scsi disable scsi support" +echo " --disable-vmware disable vmware devices" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" echo " --enable-system enable all system emulation targets" @@ -1465,6 +1475,7 @@ echo "bluetooth support $bluez" echo "usb support $usb" echo "smb directories $smb" echo "scsi support $scsi" +echo "vwmare devices $vmware" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -1794,6 +1805,10 @@ if test "$scsi" = "yes" ; then echo "#define CONFIG_SCSI 1" >> $config_h echo "CONFIG_SCSI=yes" >> $config_mak fi +if test "$vmware" = "yes" ; then + echo "#define CONFIG_VMWARE 1" >> $config_h + echo "CONFIG_VMWARE=yes" >> $config_mak +fi if test "$aio" = "yes" ; then echo "#define CONFIG_AIO 1" >> $config_h echo "CONFIG_AIO=yes" >> $config_mak diff --git a/hw/pc.c b/hw/pc.c index ee0e07f..91d7a45 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -885,7 +885,9 @@ static void pc_init1(ram_addr_t ram_size, } } +#ifdef CONFIG_VMWARE vmport_init(); +#endif /* allocate RAM */ ram_addr = qemu_ram_alloc(0xa0000); @@ -1021,11 +1023,13 @@ static void pc_init1(ram_addr_t ram_size, } else { isa_cirrus_vga_init(); } +#ifdef CONFIG_VMWARE } else if (vmsvga_enabled) { if (pci_enabled) pci_vmsvga_init(pci_bus); else fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__); +#endif } else if (std_vga_enabled) { if (pci_enabled) { pci_vga_init(pci_bus, 0, 0); diff --git a/hw/pckbd.c b/hw/pckbd.c index 092d1ba..14f5f61 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -378,7 +378,7 @@ void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base) s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s); s->mouse = ps2_mouse_init(kbd_update_aux_irq, s); -#ifdef TARGET_I386 +#if defined(TARGET_i386) && defined(CONFIG_VMWARE) vmmouse_init(s->mouse); #endif qemu_register_reset(kbd_reset, 0, s); @@ -435,7 +435,7 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s); s->mouse = ps2_mouse_init(kbd_update_aux_irq, s); -#ifdef TARGET_I386 +#if defined(TARGET_I386) && defined(CONFIG_VMWARE) vmmouse_init(s->mouse); #endif qemu_register_reset(kbd_reset, 0, s); -- 1.6.2.2