ia64/xen-unstable

changeset 10820:f3d6a5281617

[qemu] Fix -net tap option when no ifname is specified.
Uninitialized ifname can cause qemu to quit. If the first character of the
ifname is not \0, qemu will think it's a valid ifname and configure
/dev/net/tun to use it. The configuration fails and qemu exits.

Based on a patch from: Steve Dobbelstein <steved@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Thu Jul 27 11:20:32 2006 +0100 (2006-07-27)
parents b8ec4423cc44
children ed20a5addce4
files tools/ioemu/patches/domain-reset tools/ioemu/patches/domain-timeoffset tools/ioemu/patches/hypervisor-pit tools/ioemu/patches/ioemu-ia64 tools/ioemu/patches/qemu-bugfixes tools/ioemu/patches/qemu-logging tools/ioemu/patches/qemu-smp tools/ioemu/patches/shared-vram tools/ioemu/patches/support-xm-console tools/ioemu/patches/vnc-cleanup tools/ioemu/patches/vnc-fixes tools/ioemu/patches/vnc-start-vncviewer tools/ioemu/patches/xen-domain-name tools/ioemu/patches/xen-domid tools/ioemu/patches/xen-mm tools/ioemu/patches/xen-network tools/ioemu/vl.c
line diff
     1.1 --- a/tools/ioemu/patches/domain-reset	Thu Jul 27 11:12:04 2006 +0100
     1.2 +++ b/tools/ioemu/patches/domain-reset	Thu Jul 27 11:20:32 2006 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  Index: ioemu/target-i386-dm/helper2.c
     1.5  ===================================================================
     1.6 ---- ioemu.orig/target-i386-dm/helper2.c	2006-07-12 11:35:00.710827712 +0100
     1.7 -+++ ioemu/target-i386-dm/helper2.c	2006-07-12 11:35:02.419613627 +0100
     1.8 +--- ioemu.orig/target-i386-dm/helper2.c	2006-07-27 11:16:57.527492229 +0100
     1.9 ++++ ioemu/target-i386-dm/helper2.c	2006-07-27 11:16:59.381287013 +0100
    1.10  @@ -123,6 +123,25 @@
    1.11   /* called from main_cpu_reset */
    1.12   void cpu_reset(CPUX86State *env)
    1.13 @@ -41,9 +41,9 @@ Index: ioemu/target-i386-dm/helper2.c
    1.14           /* Wait up to 10 msec. */
    1.15  Index: ioemu/vl.c
    1.16  ===================================================================
    1.17 ---- ioemu.orig/vl.c	2006-07-12 11:35:02.273631916 +0100
    1.18 -+++ ioemu/vl.c	2006-07-12 11:35:02.421613376 +0100
    1.19 -@@ -4411,7 +4411,7 @@
    1.20 +--- ioemu.orig/vl.c	2006-07-27 11:16:59.317294097 +0100
    1.21 ++++ ioemu/vl.c	2006-07-27 11:16:59.384286681 +0100
    1.22 +@@ -4412,7 +4412,7 @@
    1.23   } QEMUResetEntry;
    1.24   
    1.25   static QEMUResetEntry *first_reset_entry;
    1.26 @@ -54,8 +54,8 @@ Index: ioemu/vl.c
    1.27   
    1.28  Index: ioemu/vl.h
    1.29  ===================================================================
    1.30 ---- ioemu.orig/vl.h	2006-07-12 11:35:01.454734511 +0100
    1.31 -+++ ioemu/vl.h	2006-07-12 11:35:02.422613251 +0100
    1.32 +--- ioemu.orig/vl.h	2006-07-27 11:16:58.127425816 +0100
    1.33 ++++ ioemu/vl.h	2006-07-27 11:16:59.384286681 +0100
    1.34  @@ -122,6 +122,7 @@
    1.35   
    1.36   void qemu_register_reset(QEMUResetHandler *func, void *opaque);
     2.1 --- a/tools/ioemu/patches/domain-timeoffset	Thu Jul 27 11:12:04 2006 +0100
     2.2 +++ b/tools/ioemu/patches/domain-timeoffset	Thu Jul 27 11:20:32 2006 +0100
     2.3 @@ -1,7 +1,7 @@
     2.4  Index: ioemu/hw/mc146818rtc.c
     2.5  ===================================================================
     2.6 ---- ioemu.orig/hw/mc146818rtc.c	2006-07-26 15:17:35.110819901 +0100
     2.7 -+++ ioemu/hw/mc146818rtc.c	2006-07-26 15:17:40.292255496 +0100
     2.8 +--- ioemu.orig/hw/mc146818rtc.c	2006-07-27 11:17:18.007225084 +0100
     2.9 ++++ ioemu/hw/mc146818rtc.c	2006-07-27 11:17:48.250876949 +0100
    2.10  @@ -178,10 +178,27 @@
    2.11       }
    2.12   }
    2.13 @@ -46,8 +46,8 @@ Index: ioemu/hw/mc146818rtc.c
    2.14   static void rtc_copy_date(RTCState *s)
    2.15  Index: ioemu/hw/pc.c
    2.16  ===================================================================
    2.17 ---- ioemu.orig/hw/pc.c	2006-07-26 15:17:39.820306906 +0100
    2.18 -+++ ioemu/hw/pc.c	2006-07-26 15:17:40.293255388 +0100
    2.19 +--- ioemu.orig/hw/pc.c	2006-07-27 11:17:47.993905398 +0100
    2.20 ++++ ioemu/hw/pc.c	2006-07-27 11:17:48.251876839 +0100
    2.21  @@ -151,7 +151,7 @@
    2.22   }
    2.23   
    2.24 @@ -117,8 +117,8 @@ Index: ioemu/hw/pc.c
    2.25   QEMUMachine pc_machine = {
    2.26  Index: ioemu/vl.c
    2.27  ===================================================================
    2.28 ---- ioemu.orig/vl.c	2006-07-26 15:17:40.169268893 +0100
    2.29 -+++ ioemu/vl.c	2006-07-26 15:17:40.296255061 +0100
    2.30 +--- ioemu.orig/vl.c	2006-07-27 11:17:48.126890676 +0100
    2.31 ++++ ioemu/vl.c	2006-07-27 11:17:48.254876507 +0100
    2.32  @@ -164,6 +164,8 @@
    2.33   
    2.34   int xc_handle;
    2.35 @@ -128,7 +128,7 @@ Index: ioemu/vl.c
    2.36   char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
    2.37   extern int domid;
    2.38   
    2.39 -@@ -4799,6 +4801,7 @@
    2.40 +@@ -4800,6 +4802,7 @@
    2.41   #endif
    2.42              "-loadvm file    start right away with a saved state (loadvm in monitor)\n"
    2.43   	   "-vnc display    start a VNC server on display\n"
    2.44 @@ -136,7 +136,7 @@ Index: ioemu/vl.c
    2.45              "\n"
    2.46              "During emulation, the following keys are useful:\n"
    2.47              "ctrl-alt-f      toggle full screen\n"
    2.48 -@@ -4889,6 +4892,7 @@
    2.49 +@@ -4890,6 +4893,7 @@
    2.50   
    2.51       QEMU_OPTION_d,
    2.52       QEMU_OPTION_vcpus,
    2.53 @@ -144,7 +144,7 @@ Index: ioemu/vl.c
    2.54   };
    2.55   
    2.56   typedef struct QEMUOption {
    2.57 -@@ -4967,6 +4971,7 @@
    2.58 +@@ -4968,6 +4972,7 @@
    2.59       
    2.60       { "d", HAS_ARG, QEMU_OPTION_d },
    2.61       { "vcpus", 1, QEMU_OPTION_vcpus },
    2.62 @@ -152,7 +152,7 @@ Index: ioemu/vl.c
    2.63       { NULL },
    2.64   };
    2.65   
    2.66 -@@ -5669,6 +5674,9 @@
    2.67 +@@ -5670,6 +5675,9 @@
    2.68                   vcpus = atoi(optarg);
    2.69                   fprintf(logfile, "qemu: the number of cpus is %d\n", vcpus);
    2.70                   break;
    2.71 @@ -162,7 +162,7 @@ Index: ioemu/vl.c
    2.72               }
    2.73           }
    2.74       }
    2.75 -@@ -5992,7 +6000,8 @@
    2.76 +@@ -5993,7 +6001,8 @@
    2.77   
    2.78       machine->init(ram_size, vga_ram_size, boot_device,
    2.79                     ds, fd_filename, snapshot,
    2.80 @@ -174,8 +174,8 @@ Index: ioemu/vl.c
    2.81       qemu_mod_timer(gui_timer, qemu_get_clock(rt_clock));
    2.82  Index: ioemu/vl.h
    2.83  ===================================================================
    2.84 ---- ioemu.orig/vl.h	2006-07-26 15:17:39.825306361 +0100
    2.85 -+++ ioemu/vl.h	2006-07-26 15:17:40.297254952 +0100
    2.86 +--- ioemu.orig/vl.h	2006-07-27 11:17:47.998904845 +0100
    2.87 ++++ ioemu/vl.h	2006-07-27 11:17:48.254876507 +0100
    2.88  @@ -556,7 +556,7 @@
    2.89                                    int boot_device,
    2.90                DisplayState *ds, const char **fd_filename, int snapshot,
     3.1 --- a/tools/ioemu/patches/hypervisor-pit	Thu Jul 27 11:12:04 2006 +0100
     3.2 +++ b/tools/ioemu/patches/hypervisor-pit	Thu Jul 27 11:20:32 2006 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4  Index: ioemu/Makefile.target
     3.5  ===================================================================
     3.6 ---- ioemu.orig/Makefile.target	2006-07-12 11:35:01.899678766 +0100
     3.7 -+++ ioemu/Makefile.target	2006-07-12 11:35:02.711577049 +0100
     3.8 +--- ioemu.orig/Makefile.target	2006-07-27 11:16:58.970332506 +0100
     3.9 ++++ ioemu/Makefile.target	2006-07-27 11:16:59.758245283 +0100
    3.10  @@ -333,7 +333,7 @@
    3.11   ifeq ($(TARGET_BASE_ARCH), i386)
    3.12   # Hardware support
    3.13 @@ -13,8 +13,8 @@ Index: ioemu/Makefile.target
    3.14   endif
    3.15  Index: ioemu/hw/pc.c
    3.16  ===================================================================
    3.17 ---- ioemu.orig/hw/pc.c	2006-07-12 11:35:02.059658723 +0100
    3.18 -+++ ioemu/hw/pc.c	2006-07-12 11:35:02.712576924 +0100
    3.19 +--- ioemu.orig/hw/pc.c	2006-07-27 11:16:59.036325200 +0100
    3.20 ++++ ioemu/hw/pc.c	2006-07-27 11:16:59.759245173 +0100
    3.21  @@ -38,7 +38,9 @@
    3.22   
    3.23   static fdctrl_t *floppy_controller;
    3.24 @@ -38,9 +38,9 @@ Index: ioemu/hw/pc.c
    3.25           pic_set_alt_irq_func(isa_pic, ioapic_set_irq, ioapic);
    3.26  Index: ioemu/vl.c
    3.27  ===================================================================
    3.28 ---- ioemu.orig/vl.c	2006-07-12 11:35:02.649584815 +0100
    3.29 -+++ ioemu/vl.c	2006-07-12 11:35:02.715576548 +0100
    3.30 -@@ -5033,6 +5033,7 @@
    3.31 +--- ioemu.orig/vl.c	2006-07-27 11:16:59.614261222 +0100
    3.32 ++++ ioemu/vl.c	2006-07-27 11:16:59.762244841 +0100
    3.33 +@@ -5034,6 +5034,7 @@
    3.34   
    3.35   #ifdef HAS_AUDIO
    3.36   struct soundhw soundhw[] = {
    3.37 @@ -48,7 +48,7 @@ Index: ioemu/vl.c
    3.38   #ifdef TARGET_I386
    3.39       {
    3.40           "pcspk",
    3.41 -@@ -5042,6 +5043,7 @@
    3.42 +@@ -5043,6 +5044,7 @@
    3.43           { .init_isa = pcspk_audio_init }
    3.44       },
    3.45   #endif
     4.1 --- a/tools/ioemu/patches/ioemu-ia64	Thu Jul 27 11:12:04 2006 +0100
     4.2 +++ b/tools/ioemu/patches/ioemu-ia64	Thu Jul 27 11:20:32 2006 +0100
     4.3 @@ -1,7 +1,7 @@
     4.4  Index: ioemu/hw/iommu.c
     4.5  ===================================================================
     4.6 ---- ioemu.orig/hw/iommu.c	2006-07-26 15:17:35.639762285 +0100
     4.7 -+++ ioemu/hw/iommu.c	2006-07-26 15:17:39.078387722 +0100
     4.8 +--- ioemu.orig/hw/iommu.c	2006-07-27 11:16:53.470941290 +0100
     4.9 ++++ ioemu/hw/iommu.c	2006-07-27 11:16:58.611372243 +0100
    4.10  @@ -82,7 +82,11 @@
    4.11   #define IOPTE_VALID         0x00000002 /* IOPTE is valid */
    4.12   #define IOPTE_WAZ           0x00000001 /* Write as zeros */
    4.13 @@ -16,8 +16,8 @@ Index: ioemu/hw/iommu.c
    4.14   
    4.15  Index: ioemu/cpu-all.h
    4.16  ===================================================================
    4.17 ---- ioemu.orig/cpu-all.h	2006-07-26 15:17:38.728425843 +0100
    4.18 -+++ ioemu/cpu-all.h	2006-07-26 15:17:39.079387613 +0100
    4.19 +--- ioemu.orig/cpu-all.h	2006-07-27 11:16:57.986441423 +0100
    4.20 ++++ ioemu/cpu-all.h	2006-07-27 11:16:58.617371579 +0100
    4.21  @@ -835,6 +835,31 @@
    4.22                   :"=m" (*(volatile long *)addr)
    4.23                   :"dIr" (nr));
    4.24 @@ -52,9 +52,9 @@ Index: ioemu/cpu-all.h
    4.25   /* memory API */
    4.26  Index: ioemu/vl.c
    4.27  ===================================================================
    4.28 ---- ioemu.orig/vl.c	2006-07-26 15:17:39.011395020 +0100
    4.29 -+++ ioemu/vl.c	2006-07-26 21:11:35.957492161 +0100
    4.30 -@@ -5577,6 +5577,7 @@
    4.31 +--- ioemu.orig/vl.c	2006-07-27 11:16:58.450390064 +0100
    4.32 ++++ ioemu/vl.c	2006-07-27 11:16:58.619371357 +0100
    4.33 +@@ -5578,6 +5578,7 @@
    4.34           exit(-1);
    4.35       }
    4.36   
    4.37 @@ -62,7 +62,7 @@ Index: ioemu/vl.c
    4.38       if (xc_get_pfn_list(xc_handle, domid, page_array, nr_pages) != nr_pages) {
    4.39           fprintf(logfile, "xc_get_pfn_list returned error %d\n", errno);
    4.40           exit(-1);
    4.41 -@@ -5597,6 +5598,34 @@
    4.42 +@@ -5598,6 +5599,34 @@
    4.43       fprintf(logfile, "shared page at pfn:%lx, mfn: %"PRIx64"\n", nr_pages - 1,
    4.44               (uint64_t)(page_array[nr_pages - 1]));
    4.45   
    4.46 @@ -99,8 +99,8 @@ Index: ioemu/vl.c
    4.47   #ifdef CONFIG_SOFTMMU
    4.48  Index: ioemu/target-i386-dm/exec-dm.c
    4.49  ===================================================================
    4.50 ---- ioemu.orig/target-i386-dm/exec-dm.c	2006-07-26 15:17:38.283474311 +0100
    4.51 -+++ ioemu/target-i386-dm/exec-dm.c	2006-07-26 15:17:39.081387395 +0100
    4.52 +--- ioemu.orig/target-i386-dm/exec-dm.c	2006-07-27 11:16:57.527492229 +0100
    4.53 ++++ ioemu/target-i386-dm/exec-dm.c	2006-07-27 11:16:58.620371247 +0100
    4.54  @@ -340,6 +340,23 @@
    4.55       return io_mem_read[io_index >> IO_MEM_SHIFT];
    4.56   }
    4.57 @@ -137,8 +137,8 @@ Index: ioemu/target-i386-dm/exec-dm.c
    4.58           len -= l;
    4.59  Index: ioemu/exec-all.h
    4.60  ===================================================================
    4.61 ---- ioemu.orig/exec-all.h	2006-07-26 15:17:38.200483351 +0100
    4.62 -+++ ioemu/exec-all.h	2006-07-26 21:11:41.262898983 +0100
    4.63 +--- ioemu.orig/exec-all.h	2006-07-27 11:16:57.446501195 +0100
    4.64 ++++ ioemu/exec-all.h	2006-07-27 11:16:58.621371136 +0100
    4.65  @@ -462,12 +462,13 @@
    4.66   }
    4.67   #endif
    4.68 @@ -158,8 +158,8 @@ Index: ioemu/exec-all.h
    4.69   
    4.70  Index: ioemu/target-i386-dm/cpu.h
    4.71  ===================================================================
    4.72 ---- ioemu.orig/target-i386-dm/cpu.h	2006-07-26 15:17:38.282474420 +0100
    4.73 -+++ ioemu/target-i386-dm/cpu.h	2006-07-26 15:17:39.082387287 +0100
    4.74 +--- ioemu.orig/target-i386-dm/cpu.h	2006-07-27 11:16:57.526492340 +0100
    4.75 ++++ ioemu/target-i386-dm/cpu.h	2006-07-27 11:16:58.621371136 +0100
    4.76  @@ -80,7 +80,11 @@
    4.77   /* helper2.c */
    4.78   int main_loop(void);
    4.79 @@ -175,7 +175,7 @@ Index: ioemu/target-i386-dm/cpu.h
    4.80  Index: ioemu/ia64_intrinsic.h
    4.81  ===================================================================
    4.82  --- /dev/null	1970-01-01 00:00:00.000000000 +0000
    4.83 -+++ ioemu/ia64_intrinsic.h	2006-07-26 15:17:39.083387178 +0100
    4.84 ++++ ioemu/ia64_intrinsic.h	2006-07-27 11:16:58.621371136 +0100
    4.85  @@ -0,0 +1,276 @@
    4.86  +#ifndef IA64_INTRINSIC_H
    4.87  +#define IA64_INTRINSIC_H
     5.1 --- a/tools/ioemu/patches/qemu-bugfixes	Thu Jul 27 11:12:04 2006 +0100
     5.2 +++ b/tools/ioemu/patches/qemu-bugfixes	Thu Jul 27 11:20:32 2006 +0100
     5.3 @@ -1,7 +1,7 @@
     5.4  Index: ioemu/console.c
     5.5  ===================================================================
     5.6 ---- ioemu.orig/console.c	2006-07-26 13:39:11.999009495 +0100
     5.7 -+++ ioemu/console.c	2006-07-26 14:15:19.413719225 +0100
     5.8 +--- ioemu.orig/console.c	2006-07-27 11:16:53.732912290 +0100
     5.9 ++++ ioemu/console.c	2006-07-27 11:16:57.753467214 +0100
    5.10  @@ -449,7 +449,7 @@
    5.11               c++;
    5.12           }
    5.13 @@ -50,8 +50,8 @@ Index: ioemu/console.c
    5.14       s->y_base = 0;
    5.15  Index: ioemu/usb-linux.c
    5.16  ===================================================================
    5.17 ---- ioemu.orig/usb-linux.c	2006-07-26 13:39:11.999009495 +0100
    5.18 -+++ ioemu/usb-linux.c	2006-07-26 13:39:16.622514851 +0100
    5.19 +--- ioemu.orig/usb-linux.c	2006-07-27 11:16:53.732912290 +0100
    5.20 ++++ ioemu/usb-linux.c	2006-07-27 11:16:57.754467103 +0100
    5.21  @@ -26,6 +26,7 @@
    5.22   #if defined(__linux__)
    5.23   #include <dirent.h>
    5.24 @@ -60,3 +60,15 @@ Index: ioemu/usb-linux.c
    5.25   #include <linux/usbdevice_fs.h>
    5.26   #include <linux/version.h>
    5.27   
    5.28 +Index: ioemu/vl.c
    5.29 +===================================================================
    5.30 +--- ioemu.orig/vl.c	2006-07-27 11:16:57.681475183 +0100
    5.31 ++++ ioemu/vl.c	2006-07-27 11:17:33.279534373 +0100
    5.32 +@@ -3201,6 +3201,7 @@
    5.33 +             if (net_tap_fd_init(vlan, fd))
    5.34 +                 ret = 0;
    5.35 +         } else {
    5.36 ++            ifname[0] = '\0';
    5.37 +             get_param_value(ifname, sizeof(ifname), "ifname", p);
    5.38 +             if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
    5.39 +                 pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
     6.1 --- a/tools/ioemu/patches/qemu-logging	Thu Jul 27 11:12:04 2006 +0100
     6.2 +++ b/tools/ioemu/patches/qemu-logging	Thu Jul 27 11:20:32 2006 +0100
     6.3 @@ -1,8 +1,8 @@
     6.4  Index: ioemu/vl.c
     6.5  ===================================================================
     6.6 ---- ioemu.orig/vl.c	2006-07-14 15:55:59.491503372 +0100
     6.7 -+++ ioemu/vl.c	2006-07-14 15:55:59.693480386 +0100
     6.8 -@@ -4697,7 +4697,7 @@
     6.9 +--- ioemu.orig/vl.c	2006-07-27 11:16:57.756466882 +0100
    6.10 ++++ ioemu/vl.c	2006-07-27 11:16:57.828458912 +0100
    6.11 +@@ -4698,7 +4698,7 @@
    6.12              "-S              freeze CPU at startup (use 'c' to start execution)\n"
    6.13              "-s              wait gdb connection to port %d\n"
    6.14              "-p port         change gdb connection port\n"
    6.15 @@ -11,7 +11,7 @@ Index: ioemu/vl.c
    6.16              "-hdachs c,h,s[,t]  force hard disk 0 physical geometry and the optional BIOS\n"
    6.17              "                translation (t=none or lba) (usually qemu can guess them)\n"
    6.18              "-L path         set the directory for the BIOS and VGA BIOS\n"
    6.19 -@@ -4775,7 +4775,7 @@
    6.20 +@@ -4776,7 +4776,7 @@
    6.21       QEMU_OPTION_S,
    6.22       QEMU_OPTION_s,
    6.23       QEMU_OPTION_p,
    6.24 @@ -20,7 +20,7 @@ Index: ioemu/vl.c
    6.25       QEMU_OPTION_hdachs,
    6.26       QEMU_OPTION_L,
    6.27   #ifdef USE_CODE_COPY
    6.28 -@@ -4844,7 +4844,7 @@
    6.29 +@@ -4845,7 +4845,7 @@
    6.30       { "S", 0, QEMU_OPTION_S },
    6.31       { "s", 0, QEMU_OPTION_s },
    6.32       { "p", HAS_ARG, QEMU_OPTION_p },
    6.33 @@ -29,7 +29,7 @@ Index: ioemu/vl.c
    6.34       { "hdachs", HAS_ARG, QEMU_OPTION_hdachs },
    6.35       { "L", HAS_ARG, QEMU_OPTION_L },
    6.36   #ifdef USE_CODE_COPY
    6.37 -@@ -5095,6 +5095,8 @@
    6.38 +@@ -5096,6 +5096,8 @@
    6.39       char usb_devices[MAX_VM_USB_PORTS][128];
    6.40       int usb_devices_index;
    6.41   
    6.42 @@ -38,7 +38,7 @@ Index: ioemu/vl.c
    6.43       LIST_INIT (&vm_change_state_head);
    6.44   #if !defined(CONFIG_SOFTMMU)
    6.45       /* we never want that malloc() uses mmap() */
    6.46 -@@ -5144,6 +5146,11 @@
    6.47 +@@ -5145,6 +5147,11 @@
    6.48       nb_nics = 0;
    6.49       /* default mac address of the first network interface */
    6.50       
    6.51 @@ -50,7 +50,7 @@ Index: ioemu/vl.c
    6.52       optind = 1;
    6.53       for(;;) {
    6.54           if (optind >= argc)
    6.55 -@@ -5329,7 +5336,7 @@
    6.56 +@@ -5330,7 +5337,7 @@
    6.57                       exit(1);
    6.58                   }
    6.59                   break;
    6.60 @@ -59,7 +59,7 @@ Index: ioemu/vl.c
    6.61                   {
    6.62                       int mask;
    6.63                       CPULogItem *item;
    6.64 -@@ -5700,7 +5707,7 @@
    6.65 +@@ -5701,7 +5708,7 @@
    6.66           stk.ss_flags = 0;
    6.67   
    6.68           if (sigaltstack(&stk, NULL) < 0) {
     7.1 --- a/tools/ioemu/patches/qemu-smp	Thu Jul 27 11:12:04 2006 +0100
     7.2 +++ b/tools/ioemu/patches/qemu-smp	Thu Jul 27 11:20:32 2006 +0100
     7.3 @@ -1,7 +1,7 @@
     7.4  Index: ioemu/vl.c
     7.5  ===================================================================
     7.6 ---- ioemu.orig/vl.c	2006-07-12 11:35:01.687705323 +0100
     7.7 -+++ ioemu/vl.c	2006-07-12 11:35:01.753697055 +0100
     7.8 +--- ioemu.orig/vl.c	2006-07-27 11:16:58.619371357 +0100
     7.9 ++++ ioemu/vl.c	2006-07-27 11:16:58.823348777 +0100
    7.10  @@ -159,6 +159,8 @@
    7.11   #define MAX_CPUS 1
    7.12   #endif
    7.13 @@ -11,7 +11,7 @@ Index: ioemu/vl.c
    7.14   int xc_handle;
    7.15   
    7.16   char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
    7.17 -@@ -4635,6 +4637,7 @@
    7.18 +@@ -4636,6 +4638,7 @@
    7.19              "-m megs         set virtual RAM size to megs MB [default=%d]\n"
    7.20              "-smp n          set the number of CPUs to 'n' [default=1]\n"
    7.21              "-nographic      disable graphical output and redirect serial I/Os to console\n"
    7.22 @@ -19,7 +19,7 @@ Index: ioemu/vl.c
    7.23   #ifndef _WIN32
    7.24   	   "-k language     use keyboard layout (for example \"fr\" for French)\n"
    7.25   #endif
    7.26 -@@ -4809,6 +4812,7 @@
    7.27 +@@ -4810,6 +4813,7 @@
    7.28       QEMU_OPTION_vnc,
    7.29   
    7.30       QEMU_OPTION_d,
    7.31 @@ -27,7 +27,7 @@ Index: ioemu/vl.c
    7.32   };
    7.33   
    7.34   typedef struct QEMUOption {
    7.35 -@@ -4886,6 +4890,7 @@
    7.36 +@@ -4887,6 +4891,7 @@
    7.37       { "cirrusvga", 0, QEMU_OPTION_cirrusvga },
    7.38       
    7.39       { "d", HAS_ARG, QEMU_OPTION_d },
    7.40 @@ -35,7 +35,7 @@ Index: ioemu/vl.c
    7.41       { NULL },
    7.42   };
    7.43   
    7.44 -@@ -5508,6 +5513,10 @@
    7.45 +@@ -5509,6 +5514,10 @@
    7.46                   domid = atoi(optarg);
    7.47                   fprintf(logfile, "domid: %d\n", domid);
    7.48                   break;
     8.1 --- a/tools/ioemu/patches/shared-vram	Thu Jul 27 11:12:04 2006 +0100
     8.2 +++ b/tools/ioemu/patches/shared-vram	Thu Jul 27 11:20:32 2006 +0100
     8.3 @@ -1,7 +1,7 @@
     8.4  Index: ioemu/hw/cirrus_vga.c
     8.5  ===================================================================
     8.6 ---- ioemu.orig/hw/cirrus_vga.c	2006-07-26 15:17:35.230806831 +0100
     8.7 -+++ ioemu/hw/cirrus_vga.c	2006-07-26 15:17:39.819307015 +0100
     8.8 +--- ioemu.orig/hw/cirrus_vga.c	2006-07-27 11:16:53.059986783 +0100
     8.9 ++++ ioemu/hw/cirrus_vga.c	2006-07-27 11:16:59.923227020 +0100
    8.10  @@ -28,6 +28,9 @@
    8.11    */
    8.12   #include "vl.h"
    8.13 @@ -176,8 +176,8 @@ Index: ioemu/hw/cirrus_vga.c
    8.14   }
    8.15  Index: ioemu/hw/pc.c
    8.16  ===================================================================
    8.17 ---- ioemu.orig/hw/pc.c	2006-07-26 15:17:39.752314312 +0100
    8.18 -+++ ioemu/hw/pc.c	2006-07-26 15:17:39.820306906 +0100
    8.19 +--- ioemu.orig/hw/pc.c	2006-07-27 11:16:59.759245173 +0100
    8.20 ++++ ioemu/hw/pc.c	2006-07-27 11:16:59.924226909 +0100
    8.21  @@ -783,14 +783,14 @@
    8.22       if (cirrus_vga_enabled) {
    8.23           if (pci_enabled) {
    8.24 @@ -198,8 +198,8 @@ Index: ioemu/hw/pc.c
    8.25   
    8.26  Index: ioemu/hw/vga.c
    8.27  ===================================================================
    8.28 ---- ioemu.orig/hw/vga.c	2006-07-26 15:17:39.352357879 +0100
    8.29 -+++ ioemu/hw/vga.c	2006-07-26 15:17:39.821306797 +0100
    8.30 +--- ioemu.orig/hw/vga.c	2006-07-27 11:16:59.103317784 +0100
    8.31 ++++ ioemu/hw/vga.c	2006-07-27 11:16:59.925226798 +0100
    8.32  @@ -1799,6 +1799,7 @@
    8.33       /* TODO: add vbe support if enabled */
    8.34   }
    8.35 @@ -217,7 +217,7 @@ Index: ioemu/hw/vga.c
    8.36       s->vram_offset = vga_ram_offset;
    8.37       s->vram_size = vga_ram_size;
    8.38       s->ds = ds;
    8.39 -@@ -1941,6 +1942,31 @@
    8.40 +@@ -1943,6 +1944,31 @@
    8.41       return 0;
    8.42   }
    8.43   
    8.44 @@ -251,8 +251,8 @@ Index: ioemu/hw/vga.c
    8.45   
    8.46  Index: ioemu/hw/vga_int.h
    8.47  ===================================================================
    8.48 ---- ioemu.orig/hw/vga_int.h	2006-07-26 15:17:38.201483242 +0100
    8.49 -+++ ioemu/hw/vga_int.h	2006-07-26 15:17:39.822306688 +0100
    8.50 +--- ioemu.orig/hw/vga_int.h	2006-07-27 11:16:57.447501084 +0100
    8.51 ++++ ioemu/hw/vga_int.h	2006-07-27 11:16:59.925226798 +0100
    8.52  @@ -166,5 +166,6 @@
    8.53                                unsigned int color0, unsigned int color1,
    8.54                                unsigned int color_xor);
    8.55 @@ -262,9 +262,9 @@ Index: ioemu/hw/vga_int.h
    8.56   extern const uint8_t gr_mask[16];
    8.57  Index: ioemu/vl.c
    8.58  ===================================================================
    8.59 ---- ioemu.orig/vl.c	2006-07-26 15:17:39.755313985 +0100
    8.60 -+++ ioemu/vl.c	2006-07-26 15:17:39.824306470 +0100
    8.61 -@@ -5148,6 +5148,78 @@
    8.62 +--- ioemu.orig/vl.c	2006-07-27 11:16:59.762244841 +0100
    8.63 ++++ ioemu/vl.c	2006-07-27 11:16:59.928226466 +0100
    8.64 +@@ -5149,6 +5149,78 @@
    8.65   
    8.66   #define MAX_NET_CLIENTS 32
    8.67   
    8.68 @@ -345,8 +345,8 @@ Index: ioemu/vl.c
    8.69   #ifdef CONFIG_GDBSTUB
    8.70  Index: ioemu/vl.h
    8.71  ===================================================================
    8.72 ---- ioemu.orig/vl.h	2006-07-26 15:17:39.621328580 +0100
    8.73 -+++ ioemu/vl.h	2006-07-26 15:17:39.825306361 +0100
    8.74 +--- ioemu.orig/vl.h	2006-07-27 11:16:59.549268417 +0100
    8.75 ++++ ioemu/vl.h	2006-07-27 11:16:59.929226356 +0100
    8.76  @@ -136,6 +136,13 @@
    8.77   
    8.78   void main_loop_wait(int timeout);
     9.1 --- a/tools/ioemu/patches/support-xm-console	Thu Jul 27 11:12:04 2006 +0100
     9.2 +++ b/tools/ioemu/patches/support-xm-console	Thu Jul 27 11:20:32 2006 +0100
     9.3 @@ -1,7 +1,8 @@
     9.4 -diff -r d08c08f8fbf3 vl.c
     9.5 ---- a/vl.c	Mon Jun 26 15:18:25 2006 +0100
     9.6 -+++ b/vl.c	Mon Jun 26 15:18:37 2006 +0100
     9.7 -@@ -1535,26 +1535,65 @@ CharDriverState *qemu_chr_open_stdio(voi
     9.8 +Index: ioemu/vl.c
     9.9 +===================================================================
    9.10 +--- ioemu.orig/vl.c	2006-07-27 11:16:59.384286681 +0100
    9.11 ++++ ioemu/vl.c	2006-07-27 11:16:59.614261222 +0100
    9.12 +@@ -1535,26 +1535,65 @@
    9.13       return chr;
    9.14   }
    9.15   
    9.16 @@ -65,19 +66,18 @@ diff -r d08c08f8fbf3 vl.c
    9.17  -    tty.c_cc[VMIN] = 1;
    9.18  -    tty.c_cc[VTIME] = 0;
    9.19  -    tcsetattr (master_fd, TCSAFLUSH, &tty);
    9.20 --
    9.21 --    fprintf(stderr, "char device redirected to %s\n", slave_name);
    9.22  +    /* Set raw attributes on the pty. */
    9.23  +    cfmakeraw(&tty);
    9.24  +    tcsetattr(slave_fd, TCSAFLUSH, &tty);
    9.25  +    
    9.26  +    fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
    9.27  +    store_console_dev(domid, ptsname(master_fd));
    9.28 -+
    9.29 + 
    9.30 +-    fprintf(stderr, "char device redirected to %s\n", slave_name);
    9.31       return qemu_chr_open_fd(master_fd, master_fd);
    9.32   }
    9.33   
    9.34 -@@ -5297,7 +5336,9 @@ int main(int argc, char **argv)
    9.35 +@@ -5298,7 +5337,9 @@
    9.36                   break;
    9.37               case QEMU_OPTION_nographic:
    9.38                   pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
    10.1 --- a/tools/ioemu/patches/vnc-cleanup	Thu Jul 27 11:12:04 2006 +0100
    10.2 +++ b/tools/ioemu/patches/vnc-cleanup	Thu Jul 27 11:20:32 2006 +0100
    10.3 @@ -1,7 +1,8 @@
    10.4 -diff -r c84300f3abc2 vnc.c
    10.5 ---- a/vnc.c	Wed Jul 05 18:11:23 2006 +0100
    10.6 -+++ b/vnc.c	Thu Jul 06 14:27:28 2006 +0100
    10.7 -@@ -83,13 +83,16 @@ static void vnc_dpy_update(DisplayState 
    10.8 +Index: ioemu/vnc.c
    10.9 +===================================================================
   10.10 +--- ioemu.orig/vnc.c	2006-07-27 11:16:52.783017443 +0100
   10.11 ++++ ioemu/vnc.c	2006-07-27 11:17:00.722138579 +0100
   10.12 +@@ -83,13 +83,16 @@
   10.13   static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int h)
   10.14   {
   10.15       VncState *vs = ds->opaque;
   10.16 @@ -21,7 +22,7 @@ diff -r c84300f3abc2 vnc.c
   10.17   }
   10.18   
   10.19   static void vnc_framebuffer_update(VncState *vs, int x, int y, int w, int h,
   10.20 -@@ -262,6 +265,7 @@ static void vnc_update_client(void *opaq
   10.21 +@@ -262,6 +265,7 @@
   10.22   static void vnc_update_client(void *opaque)
   10.23   {
   10.24       VncState *vs = opaque;
   10.25 @@ -29,7 +30,7 @@ diff -r c84300f3abc2 vnc.c
   10.26   
   10.27       if (vs->need_update && vs->csock != -1) {
   10.28   	int y;
   10.29 -@@ -282,7 +286,7 @@ static void vnc_update_client(void *opaq
   10.30 +@@ -282,7 +286,7 @@
   10.31   	row = vs->ds->data;
   10.32   	old_row = vs->old_data;
   10.33   
   10.34 @@ -38,7 +39,7 @@ diff -r c84300f3abc2 vnc.c
   10.35   	    if (vs->dirty_row[y] & width_mask) {
   10.36   		int x;
   10.37   		char *ptr, *old_ptr;
   10.38 -@@ -307,10 +311,8 @@ static void vnc_update_client(void *opaq
   10.39 +@@ -307,10 +311,8 @@
   10.40   	    old_row += vs->ds->linesize;
   10.41   	}
   10.42   
   10.43 @@ -51,7 +52,7 @@ diff -r c84300f3abc2 vnc.c
   10.44   
   10.45   	/* Count rectangles */
   10.46   	n_rectangles = 0;
   10.47 -@@ -348,7 +350,9 @@ static void vnc_update_client(void *opaq
   10.48 +@@ -348,7 +350,9 @@
   10.49   	vnc_flush(vs);
   10.50   
   10.51       }
   10.52 @@ -62,10 +63,11 @@ diff -r c84300f3abc2 vnc.c
   10.53   }
   10.54   
   10.55   static void vnc_timer_init(VncState *vs)
   10.56 -diff -r c84300f3abc2 vl.c
   10.57 ---- a/vl.c	Wed Jul 05 18:11:23 2006 +0100
   10.58 -+++ b/vl.c	Thu Jul 06 14:27:28 2006 +0100
   10.59 -@@ -4586,10 +4586,10 @@ void main_loop_wait(int timeout)
   10.60 +Index: ioemu/vl.c
   10.61 +===================================================================
   10.62 +--- ioemu.orig/vl.c	2006-07-27 11:17:00.311184072 +0100
   10.63 ++++ ioemu/vl.c	2006-07-27 11:17:00.724138358 +0100
   10.64 +@@ -4587,10 +4587,10 @@
   10.65           /* XXX: better handling of removal */
   10.66           for(ioh = first_io_handler; ioh != NULL; ioh = ioh_next) {
   10.67               ioh_next = ioh->next;
    11.1 --- a/tools/ioemu/patches/vnc-fixes	Thu Jul 27 11:12:04 2006 +0100
    11.2 +++ b/tools/ioemu/patches/vnc-fixes	Thu Jul 27 11:20:32 2006 +0100
    11.3 @@ -1,8 +1,8 @@
    11.4  Index: ioemu/vl.c
    11.5  ===================================================================
    11.6 ---- ioemu.orig/vl.c	2006-07-26 14:29:04.481598583 +0100
    11.7 -+++ ioemu/vl.c	2006-07-26 14:31:22.668325993 +0100
    11.8 -@@ -6003,8 +6003,10 @@
    11.9 +--- ioemu.orig/vl.c	2006-07-27 11:17:00.724138358 +0100
   11.10 ++++ ioemu/vl.c	2006-07-27 11:17:00.874121755 +0100
   11.11 +@@ -6004,8 +6004,10 @@
   11.12                     kernel_filename, kernel_cmdline, initrd_filename,
   11.13                     timeoffset);
   11.14   
   11.15 @@ -17,8 +17,8 @@ Index: ioemu/vl.c
   11.16       if (use_gdbstub) {
   11.17  Index: ioemu/vnc.c
   11.18  ===================================================================
   11.19 ---- ioemu.orig/vnc.c	2006-07-26 14:29:04.479598804 +0100
   11.20 -+++ ioemu/vnc.c	2006-07-26 14:31:22.669325883 +0100
   11.21 +--- ioemu.orig/vnc.c	2006-07-27 11:17:00.722138579 +0100
   11.22 ++++ ioemu/vnc.c	2006-07-27 11:17:00.875121644 +0100
   11.23  @@ -3,6 +3,7 @@
   11.24    * 
   11.25    * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
   11.26 @@ -493,8 +493,8 @@ Index: ioemu/vnc.c
   11.27   }
   11.28  Index: ioemu/vl.h
   11.29  ===================================================================
   11.30 ---- ioemu.orig/vl.h	2006-07-26 14:31:22.669325883 +0100
   11.31 -+++ ioemu/vl.h	2006-07-26 14:32:44.505279724 +0100
   11.32 +--- ioemu.orig/vl.h	2006-07-27 11:17:00.311184072 +0100
   11.33 ++++ ioemu/vl.h	2006-07-27 11:17:00.875121644 +0100
   11.34  @@ -301,6 +301,7 @@
   11.35   int is_graphic_console(void);
   11.36   CharDriverState *text_console_init(DisplayState *ds);
    12.1 --- a/tools/ioemu/patches/vnc-start-vncviewer	Thu Jul 27 11:12:04 2006 +0100
    12.2 +++ b/tools/ioemu/patches/vnc-start-vncviewer	Thu Jul 27 11:20:32 2006 +0100
    12.3 @@ -1,7 +1,7 @@
    12.4  Index: ioemu/vnc.c
    12.5  ===================================================================
    12.6 ---- ioemu.orig/vnc.c	2006-07-26 14:33:08.166663983 +0100
    12.7 -+++ ioemu/vnc.c	2006-07-26 14:33:08.225657462 +0100
    12.8 +--- ioemu.orig/vnc.c	2006-07-27 11:17:00.875121644 +0100
    12.9 ++++ ioemu/vnc.c	2006-07-27 11:17:01.032104266 +0100
   12.10  @@ -1002,3 +1002,25 @@
   12.11   
   12.12       vnc_dpy_resize(vs->ds, 640, 400);
   12.13 @@ -30,8 +30,8 @@ Index: ioemu/vnc.c
   12.14  +}
   12.15  Index: ioemu/vl.c
   12.16  ===================================================================
   12.17 ---- ioemu.orig/vl.c	2006-07-26 14:33:08.165664094 +0100
   12.18 -+++ ioemu/vl.c	2006-07-26 14:33:08.227657240 +0100
   12.19 +--- ioemu.orig/vl.c	2006-07-27 11:17:00.874121755 +0100
   12.20 ++++ ioemu/vl.c	2006-07-27 11:17:01.035103934 +0100
   12.21  @@ -121,6 +121,7 @@
   12.22   int bios_size;
   12.23   static DisplayState display_state;
   12.24 @@ -40,7 +40,7 @@ Index: ioemu/vl.c
   12.25   const char* keyboard_layout = NULL;
   12.26   int64_t ticks_per_sec;
   12.27   int boot_device = 'c';
   12.28 -@@ -4801,6 +4802,7 @@
   12.29 +@@ -4802,6 +4803,7 @@
   12.30   #endif
   12.31              "-loadvm file    start right away with a saved state (loadvm in monitor)\n"
   12.32   	   "-vnc display    start a VNC server on display\n"
   12.33 @@ -48,7 +48,7 @@ Index: ioemu/vl.c
   12.34              "-timeoffset     time offset (in seconds) from local time\n"
   12.35              "\n"
   12.36              "During emulation, the following keys are useful:\n"
   12.37 -@@ -4889,6 +4891,7 @@
   12.38 +@@ -4890,6 +4892,7 @@
   12.39       QEMU_OPTION_usbdevice,
   12.40       QEMU_OPTION_smp,
   12.41       QEMU_OPTION_vnc,
   12.42 @@ -56,7 +56,7 @@ Index: ioemu/vl.c
   12.43   
   12.44       QEMU_OPTION_d,
   12.45       QEMU_OPTION_vcpus,
   12.46 -@@ -4964,6 +4967,7 @@
   12.47 +@@ -4965,6 +4968,7 @@
   12.48       { "usbdevice", HAS_ARG, QEMU_OPTION_usbdevice },
   12.49       { "smp", HAS_ARG, QEMU_OPTION_smp },
   12.50       { "vnc", HAS_ARG, QEMU_OPTION_vnc },
   12.51 @@ -64,7 +64,7 @@ Index: ioemu/vl.c
   12.52       
   12.53       /* temporary options */
   12.54       { "usb", 0, QEMU_OPTION_usb },
   12.55 -@@ -5294,6 +5298,7 @@
   12.56 +@@ -5295,6 +5299,7 @@
   12.57   #endif
   12.58       snapshot = 0;
   12.59       nographic = 0;
   12.60 @@ -72,7 +72,7 @@ Index: ioemu/vl.c
   12.61       kernel_filename = NULL;
   12.62       kernel_cmdline = "";
   12.63   #ifdef TARGET_PPC
   12.64 -@@ -5663,6 +5668,9 @@
   12.65 +@@ -5664,6 +5669,9 @@
   12.66   		    exit(1);
   12.67   		}
   12.68   		break;
   12.69 @@ -82,7 +82,7 @@ Index: ioemu/vl.c
   12.70               case QEMU_OPTION_domainname:
   12.71                   strncat(domain_name, optarg, sizeof(domain_name) - 20);
   12.72                   break;
   12.73 -@@ -5910,6 +5918,8 @@
   12.74 +@@ -5911,6 +5919,8 @@
   12.75           dumb_display_init(ds);
   12.76       } else if (vnc_display != -1) {
   12.77   	vnc_display_init(ds, vnc_display);
   12.78 @@ -93,8 +93,8 @@ Index: ioemu/vl.c
   12.79           sdl_display_init(ds, full_screen);
   12.80  Index: ioemu/vl.h
   12.81  ===================================================================
   12.82 ---- ioemu.orig/vl.h	2006-07-26 14:33:08.167663873 +0100
   12.83 -+++ ioemu/vl.h	2006-07-26 14:33:08.228657130 +0100
   12.84 +--- ioemu.orig/vl.h	2006-07-27 11:17:00.875121644 +0100
   12.85 ++++ ioemu/vl.h	2006-07-27 11:17:01.036103823 +0100
   12.86  @@ -733,6 +733,7 @@
   12.87   
   12.88   /* vnc.c */
    13.1 --- a/tools/ioemu/patches/xen-domain-name	Thu Jul 27 11:12:04 2006 +0100
    13.2 +++ b/tools/ioemu/patches/xen-domain-name	Thu Jul 27 11:20:32 2006 +0100
    13.3 @@ -1,7 +1,7 @@
    13.4  Index: ioemu/sdl.c
    13.5  ===================================================================
    13.6 ---- ioemu.orig/sdl.c	2006-07-12 11:33:54.665109493 +0100
    13.7 -+++ ioemu/sdl.c	2006-07-12 11:35:01.450735012 +0100
    13.8 +--- ioemu.orig/sdl.c	2006-07-27 11:16:53.590928008 +0100
    13.9 ++++ ioemu/sdl.c	2006-07-27 11:16:58.124426148 +0100
   13.10  @@ -268,14 +268,14 @@
   13.11   static void sdl_update_caption(void)
   13.12   {
   13.13 @@ -21,8 +21,8 @@ Index: ioemu/sdl.c
   13.14   static void sdl_hide_cursor(void)
   13.15  Index: ioemu/vl.c
   13.16  ===================================================================
   13.17 ---- ioemu.orig/vl.c	2006-07-12 11:35:01.094779608 +0100
   13.18 -+++ ioemu/vl.c	2006-07-12 11:35:01.453734636 +0100
   13.19 +--- ioemu.orig/vl.c	2006-07-27 11:16:57.828458912 +0100
   13.20 ++++ ioemu/vl.c	2006-07-27 11:16:58.126425927 +0100
   13.21  @@ -159,6 +159,8 @@
   13.22   #define MAX_CPUS 1
   13.23   #endif
   13.24 @@ -32,7 +32,7 @@ Index: ioemu/vl.c
   13.25   /***********************************************************/
   13.26   /* x86 ISA bus support */
   13.27   
   13.28 -@@ -4698,6 +4700,7 @@
   13.29 +@@ -4699,6 +4701,7 @@
   13.30              "-s              wait gdb connection to port %d\n"
   13.31              "-p port         change gdb connection port\n"
   13.32              "-l item1,...    output log to %s (use -d ? for a list of log items)\n"
   13.33 @@ -40,7 +40,7 @@ Index: ioemu/vl.c
   13.34              "-hdachs c,h,s[,t]  force hard disk 0 physical geometry and the optional BIOS\n"
   13.35              "                translation (t=none or lba) (usually qemu can guess them)\n"
   13.36              "-L path         set the directory for the BIOS and VGA BIOS\n"
   13.37 -@@ -4787,6 +4790,7 @@
   13.38 +@@ -4788,6 +4791,7 @@
   13.39       QEMU_OPTION_g,
   13.40       QEMU_OPTION_std_vga,
   13.41       QEMU_OPTION_monitor,
   13.42 @@ -48,7 +48,7 @@ Index: ioemu/vl.c
   13.43       QEMU_OPTION_serial,
   13.44       QEMU_OPTION_parallel,
   13.45       QEMU_OPTION_loadvm,
   13.46 -@@ -4860,6 +4864,7 @@
   13.47 +@@ -4861,6 +4865,7 @@
   13.48       { "localtime", 0, QEMU_OPTION_localtime },
   13.49       { "std-vga", 0, QEMU_OPTION_std_vga },
   13.50       { "monitor", 1, QEMU_OPTION_monitor },
   13.51 @@ -56,7 +56,7 @@ Index: ioemu/vl.c
   13.52       { "serial", 1, QEMU_OPTION_serial },
   13.53       { "parallel", 1, QEMU_OPTION_parallel },
   13.54       { "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
   13.55 -@@ -5483,6 +5488,9 @@
   13.56 +@@ -5484,6 +5489,9 @@
   13.57   		    exit(1);
   13.58   		}
   13.59   		break;
   13.60 @@ -68,8 +68,8 @@ Index: ioemu/vl.c
   13.61       }
   13.62  Index: ioemu/vl.h
   13.63  ===================================================================
   13.64 ---- ioemu.orig/vl.h	2006-07-12 11:35:00.955797021 +0100
   13.65 -+++ ioemu/vl.h	2006-07-12 11:35:01.454734511 +0100
   13.66 +--- ioemu.orig/vl.h	2006-07-27 11:16:57.682475072 +0100
   13.67 ++++ ioemu/vl.h	2006-07-27 11:16:58.127425816 +0100
   13.68  @@ -1094,4 +1094,5 @@
   13.69   
   13.70   void kqemu_record_dump(void);
    14.1 --- a/tools/ioemu/patches/xen-domid	Thu Jul 27 11:12:04 2006 +0100
    14.2 +++ b/tools/ioemu/patches/xen-domid	Thu Jul 27 11:20:32 2006 +0100
    14.3 @@ -1,7 +1,8 @@
    14.4 -diff -r 03705e837ce8 vl.c
    14.5 ---- a/vl.c	Tue May 30 14:10:44 2006 +0100
    14.6 -+++ b/vl.c	Tue May 30 14:11:16 2006 +0100
    14.7 -@@ -160,6 +160,7 @@ int vnc_display = -1;
    14.8 +Index: ioemu/vl.c
    14.9 +===================================================================
   14.10 +--- ioemu.orig/vl.c	2006-07-27 11:16:58.126425927 +0100
   14.11 ++++ ioemu/vl.c	2006-07-27 11:16:58.296407110 +0100
   14.12 +@@ -160,6 +160,7 @@
   14.13   #endif
   14.14   
   14.15   char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
   14.16 @@ -9,7 +10,7 @@ diff -r 03705e837ce8 vl.c
   14.17   
   14.18   /***********************************************************/
   14.19   /* x86 ISA bus support */
   14.20 -@@ -4700,6 +4701,7 @@ void help(void)
   14.21 +@@ -4701,6 +4702,7 @@
   14.22              "-s              wait gdb connection to port %d\n"
   14.23              "-p port         change gdb connection port\n"
   14.24              "-l item1,...    output log to %s (use -d ? for a list of log items)\n"
   14.25 @@ -17,7 +18,7 @@ diff -r 03705e837ce8 vl.c
   14.26              "-domain-name    domain name that we're serving\n"
   14.27              "-hdachs c,h,s[,t]  force hard disk 0 physical geometry and the optional BIOS\n"
   14.28              "                translation (t=none or lba) (usually qemu can guess them)\n"
   14.29 -@@ -4803,6 +4805,8 @@ enum {
   14.30 +@@ -4804,6 +4806,8 @@
   14.31       QEMU_OPTION_usbdevice,
   14.32       QEMU_OPTION_smp,
   14.33       QEMU_OPTION_vnc,
   14.34 @@ -26,7 +27,7 @@ diff -r 03705e837ce8 vl.c
   14.35   };
   14.36   
   14.37   typedef struct QEMUOption {
   14.38 -@@ -4878,6 +4882,8 @@ const QEMUOption qemu_options[] = {
   14.39 +@@ -4879,6 +4883,8 @@
   14.40       /* temporary options */
   14.41       { "usb", 0, QEMU_OPTION_usb },
   14.42       { "cirrusvga", 0, QEMU_OPTION_cirrusvga },
   14.43 @@ -35,7 +36,7 @@ diff -r 03705e837ce8 vl.c
   14.44       { NULL },
   14.45   };
   14.46   
   14.47 -@@ -5491,6 +5497,10 @@ int main(int argc, char **argv)
   14.48 +@@ -5492,6 +5498,10 @@
   14.49               case QEMU_OPTION_domainname:
   14.50                   strncat(domain_name, optarg, sizeof(domain_name) - 20);
   14.51                   break;
    15.1 --- a/tools/ioemu/patches/xen-mm	Thu Jul 27 11:12:04 2006 +0100
    15.2 +++ b/tools/ioemu/patches/xen-mm	Thu Jul 27 11:20:32 2006 +0100
    15.3 @@ -1,7 +1,7 @@
    15.4  Index: ioemu/hw/pc.c
    15.5  ===================================================================
    15.6 ---- ioemu.orig/hw/pc.c	2006-07-14 15:55:59.489503600 +0100
    15.7 -+++ ioemu/hw/pc.c	2006-07-14 15:56:00.354405169 +0100
    15.8 +--- ioemu.orig/hw/pc.c	2006-07-27 11:16:57.678475515 +0100
    15.9 ++++ ioemu/hw/pc.c	2006-07-27 11:16:58.447390396 +0100
   15.10  @@ -639,7 +639,9 @@
   15.11       }
   15.12   
   15.13 @@ -25,8 +25,8 @@ Index: ioemu/hw/pc.c
   15.14       isa_bios_size = bios_size;
   15.15  Index: ioemu/vl.c
   15.16  ===================================================================
   15.17 ---- ioemu.orig/vl.c	2006-07-14 15:56:00.271414614 +0100
   15.18 -+++ ioemu/vl.c	2006-07-14 15:56:00.358404714 +0100
   15.19 +--- ioemu.orig/vl.c	2006-07-27 11:16:58.296407110 +0100
   15.20 ++++ ioemu/vl.c	2006-07-27 11:16:58.450390064 +0100
   15.21  @@ -159,6 +159,8 @@
   15.22   #define MAX_CPUS 1
   15.23   #endif
   15.24 @@ -36,7 +36,7 @@ Index: ioemu/vl.c
   15.25   char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
   15.26   extern int domid;
   15.27   
   15.28 -@@ -5105,6 +5107,9 @@
   15.29 +@@ -5106,6 +5108,9 @@
   15.30       QEMUMachine *machine;
   15.31       char usb_devices[MAX_VM_USB_PORTS][128];
   15.32       int usb_devices_index;
   15.33 @@ -46,7 +46,7 @@ Index: ioemu/vl.c
   15.34   
   15.35       char qemu_dm_logfilename[64];
   15.36   
   15.37 -@@ -5341,11 +5346,13 @@
   15.38 +@@ -5342,11 +5347,13 @@
   15.39                   ram_size = atol(optarg) * 1024 * 1024;
   15.40                   if (ram_size <= 0)
   15.41                       help();
   15.42 @@ -60,7 +60,7 @@ Index: ioemu/vl.c
   15.43                   break;
   15.44               case QEMU_OPTION_l:
   15.45                   {
   15.46 -@@ -5559,6 +5566,39 @@
   15.47 +@@ -5560,6 +5567,39 @@
   15.48       /* init the memory */
   15.49       phys_ram_size = ram_size + vga_ram_size + bios_size;
   15.50   
   15.51 @@ -100,7 +100,7 @@ Index: ioemu/vl.c
   15.52   #ifdef CONFIG_SOFTMMU
   15.53       phys_ram_base = qemu_vmalloc(phys_ram_size);
   15.54       if (!phys_ram_base) {
   15.55 -@@ -5599,6 +5639,8 @@
   15.56 +@@ -5600,6 +5640,8 @@
   15.57       }
   15.58   #endif
   15.59   
    16.1 --- a/tools/ioemu/patches/xen-network	Thu Jul 27 11:12:04 2006 +0100
    16.2 +++ b/tools/ioemu/patches/xen-network	Thu Jul 27 11:20:32 2006 +0100
    16.3 @@ -1,7 +1,7 @@
    16.4  Index: ioemu/vl.c
    16.5  ===================================================================
    16.6 ---- ioemu.orig/vl.c	2006-07-12 11:35:01.753697055 +0100
    16.7 -+++ ioemu/vl.c	2006-07-12 11:35:02.126650330 +0100
    16.8 +--- ioemu.orig/vl.c	2006-07-27 11:16:58.823348777 +0100
    16.9 ++++ ioemu/vl.c	2006-07-27 11:16:59.169310479 +0100
   16.10  @@ -89,6 +89,7 @@
   16.11   #include "exec-all.h"
   16.12   
   16.13 @@ -40,7 +40,7 @@ Index: ioemu/vl.c
   16.14           int fd;
   16.15           if (get_param_value(buf, sizeof(buf), "fd", p) > 0) {
   16.16               fd = strtol(buf, NULL, 0);
   16.17 -@@ -3212,7 +3215,10 @@
   16.18 +@@ -3213,7 +3216,10 @@
   16.19               if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
   16.20                   pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
   16.21               }
   16.22 @@ -52,7 +52,7 @@ Index: ioemu/vl.c
   16.23           }
   16.24       } else
   16.25   #endif
   16.26 -@@ -4671,7 +4677,7 @@
   16.27 +@@ -4672,7 +4678,7 @@
   16.28              "-net tap[,vlan=n],ifname=name\n"
   16.29              "                connect the host TAP network interface to VLAN 'n'\n"
   16.30   #else
    17.1 --- a/tools/ioemu/vl.c	Thu Jul 27 11:12:04 2006 +0100
    17.2 +++ b/tools/ioemu/vl.c	Thu Jul 27 11:20:32 2006 +0100
    17.3 @@ -3284,6 +3284,7 @@ int net_client_init(const char *str)
    17.4              if (net_tap_fd_init(vlan, fd))
    17.5                  ret = 0;
    17.6          } else {
    17.7 +            ifname[0] = '\0';
    17.8              get_param_value(ifname, sizeof(ifname), "ifname", p);
    17.9              if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
   17.10                  pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);