From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXLQy-0002KT-Oy for qemu-devel@nongnu.org; Sun, 24 Aug 2008 15:39:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXLQy-0002Jw-3d for qemu-devel@nongnu.org; Sun, 24 Aug 2008 15:39:32 -0400 Received: from [199.232.76.173] (port=40880 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXLQx-0002Jo-UX for qemu-devel@nongnu.org; Sun, 24 Aug 2008 15:39:31 -0400 Received: from mail-gx0-f19.google.com ([209.85.217.19]:34615) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXLQx-0001o4-Iq for qemu-devel@nongnu.org; Sun, 24 Aug 2008 15:39:31 -0400 Received: by gxk12 with SMTP id 12so1682347gxk.10 for ; Sun, 24 Aug 2008 12:39:31 -0700 (PDT) Message-ID: <48B1B8C5.4040902@codemonkey.ws> Date: Sun, 24 Aug 2008 14:38:45 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/1] Make vmport an optional feature at run time. References: <1219578445-25610-1-git-send-email-blob@blob.co.uk> In-Reply-To: <1219578445-25610-1-git-send-email-blob@blob.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ian Kirk Ian Kirk wrote: > Hi, > > This is my first time sending a patch, so apologies for any errors. > > Patch makes vmport optionally initiated. > Why should it be optional? Regards, Anthony Liguori > --- > hw/pc.c | 3 ++- > hw/pc.h | 1 + > vl.c | 7 +++++++ > 3 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index 213ead8..56e1641 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -774,7 +774,8 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, > } > } > > - vmport_init(); > + if (!no_vmport) > + vmport_init(); > > /* allocate RAM */ > ram_addr = qemu_ram_alloc(ram_size); > diff --git a/hw/pc.h b/hw/pc.h > index 2862849..b19d626 100644 > --- a/hw/pc.h > +++ b/hw/pc.h > @@ -84,6 +84,7 @@ void rtc_set_date(RTCState *s, const struct tm *tm); > > /* pc.c */ > extern int fd_bootchk; > +extern int no_vmport; > > void ioport_set_a20(int enable); > int ioport_get_a20(void); > diff --git a/vl.c b/vl.c > index 7ca8420..21012bf 100644 > --- a/vl.c > +++ b/vl.c > @@ -217,6 +217,7 @@ const char *vnc_display; > #endif > int acpi_enabled = 1; > int fd_bootchk = 1; > +int no_vmport = 0; > int no_reboot = 0; > int no_shutdown = 0; > int cursor_hide = 1; > @@ -7664,6 +7665,7 @@ static void help(int exitcode) > "-pflash file use 'file' as a parallel flash image\n" > "-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\n" > "-snapshot write to temporary files instead of disk image files\n" > + "-no-vmport disable vmport\n" > #ifdef CONFIG_SDL > "-no-frame open SDL window without a frame and window decorations\n" > "-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt)\n" > @@ -7825,6 +7827,7 @@ enum { > QEMU_OPTION_pflash, > QEMU_OPTION_boot, > QEMU_OPTION_snapshot, > + QEMU_OPTION_no_vmport, > #ifdef TARGET_I386 > QEMU_OPTION_no_fd_bootchk, > #endif > @@ -7918,6 +7921,7 @@ const QEMUOption qemu_options[] = { > { "pflash", HAS_ARG, QEMU_OPTION_pflash }, > { "boot", HAS_ARG, QEMU_OPTION_boot }, > { "snapshot", 0, QEMU_OPTION_snapshot }, > + { "no-vmport", 0, QEMU_OPTION_no_vmport }, > #ifdef TARGET_I386 > { "no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk }, > #endif > @@ -8411,6 +8415,9 @@ int main(int argc, char **argv) > case QEMU_OPTION_pflash: > drive_add(optarg, PFLASH_ALIAS); > break; > + case QEMU_OPTION_no_vmport: > + no_vmport = 1; > + break; > case QEMU_OPTION_snapshot: > snapshot = 1; > break; >