From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1METZ4-00065x-CC for qemu-devel@nongnu.org; Wed, 10 Jun 2009 15:34:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1METYz-0005z9-IE for qemu-devel@nongnu.org; Wed, 10 Jun 2009 15:34:25 -0400 Received: from [199.232.76.173] (port=52038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1METYz-0005yx-Dy for qemu-devel@nongnu.org; Wed, 10 Jun 2009 15:34:21 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1METYy-0001Vt-Te for qemu-devel@nongnu.org; Wed, 10 Jun 2009 15:34:21 -0400 Date: Wed, 10 Jun 2009 16:34:08 -0300 From: Eduardo Habkost Message-ID: <20090610193408.GE18045@blackpad> References: <1244661817-3293-1-git-send-email-ehabkost@redhat.com> <4A300891.4060500@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A300891.4060500@codemonkey.ws> Subject: [Qemu-devel] Re: [PATCH] Add -no-virtio-balloon command-line option List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Wed, Jun 10, 2009 at 02:25:05PM -0500, Anthony Liguori wrote: > Eduardo Habkost wrote: >> This new option may be used to disable the virtio-balloon device. >> >> Signed-off-by: Eduardo Habkost >> --- >> hw/pc.c | 2 +- >> qemu-options.hx | 9 +++++++++ >> sysemu.h | 1 + >> vl.c | 4 ++++ >> 4 files changed, 15 insertions(+), 1 deletions(-) >> >> diff --git a/hw/pc.c b/hw/pc.c >> index 0934778..aa92576 100644 >> --- a/hw/pc.c >> +++ b/hw/pc.c >> @@ -1152,7 +1152,7 @@ static void pc_init1(ram_addr_t ram_size, >> } >> /* Add virtio balloon device */ >> - if (pci_enabled) { >> + if (pci_enabled && !no_virtio_balloon) { >> pci_create_simple(pci_bus, -1, "virtio-balloon-pci"); >> } >> diff --git a/qemu-options.hx b/qemu-options.hx >> index fa549c3..cb68e2a 100644 >> --- a/qemu-options.hx >> +++ b/qemu-options.hx >> @@ -681,6 +681,15 @@ Disable HPET support. >> ETEXI >> #ifdef TARGET_I386 >> +DEF("no-virtio-balloon", 0, QEMU_OPTION_no_virtio_balloon, >> + "-no-virtio-baloon disable virtio balloon device\n") >> > Missing 'l'. Oops! Fixed version below. >>From 1276e7dca28cfcf5eae1ed69fe5a9ae0853647c6 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Tue, 9 Jun 2009 17:06:58 -0300 Subject: [PATCH] Add -no-virtio-balloon command-line option This new option may be used to disable the virtio-balloon device. Signed-off-by: Eduardo Habkost --- hw/pc.c | 2 +- qemu-options.hx | 9 +++++++++ sysemu.h | 1 + vl.c | 4 ++++ 4 files changed, 15 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 0934778..aa92576 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1152,7 +1152,7 @@ static void pc_init1(ram_addr_t ram_size, } /* Add virtio balloon device */ - if (pci_enabled) { + if (pci_enabled && !no_virtio_balloon) { pci_create_simple(pci_bus, -1, "virtio-balloon-pci"); } diff --git a/qemu-options.hx b/qemu-options.hx index fa549c3..9d5e05a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -681,6 +681,15 @@ Disable HPET support. ETEXI #ifdef TARGET_I386 +DEF("no-virtio-balloon", 0, QEMU_OPTION_no_virtio_balloon, + "-no-virtio-balloon disable virtio balloon device\n") +#endif +STEXI +@item -no-virtio-balloon +Disable virtio-balloon device. +ETEXI + +#ifdef TARGET_I386 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable, "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...]\n" " ACPI table description\n") diff --git a/sysemu.h b/sysemu.h index 658aeec..4a0ddcb 100644 --- a/sysemu.h +++ b/sysemu.h @@ -116,6 +116,7 @@ extern int win2k_install_hack; extern int rtc_td_hack; extern int alt_grab; extern int usb_enabled; +extern int no_virtio_balloon; extern int smp_cpus; extern int cursor_hide; extern int graphic_rotate; diff --git a/vl.c b/vl.c index 69a9f91..9f7216f 100644 --- a/vl.c +++ b/vl.c @@ -244,6 +244,7 @@ int smp_cpus = 1; const char *vnc_display; int acpi_enabled = 1; int no_hpet = 0; +int no_virtio_balloon = 0; int fd_bootchk = 1; int no_reboot = 0; int no_shutdown = 0; @@ -5552,6 +5553,9 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_no_hpet: no_hpet = 1; break; + case QEMU_OPTION_no_virtio_balloon: + no_virtio_balloon = 1; + break; #endif case QEMU_OPTION_no_reboot: no_reboot = 1; -- 1.6.3.rc4.29.g8146 -- Eduardo