[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] RE: [Xen-users] xm create of a VMX fails - qemu-dm gets SIGSEGV



"Yu, Ping Y" <ping.y.yu@xxxxxxxxx> wrote on 12/01/2005 03:01:30 AM:

> Thanks Daniel. :-)
> The protection mechanism is a little weak.  Here is my patch.
>
> diff -r 28ce48573771 tools/ioemu/vl.c
> --- a/tools/ioemu/vl.c  Wed Nov 30 19:55:08 2005
> +++ b/tools/ioemu/vl.c  Thu Dec  1 17:00:21 2005
> @@ -1218,17 +1218,22 @@
>  CharDriverState *qemu_chr_open_pty(void)
>  {
>      int master_fd, slave_fd;
> +    char *slave_name;
>      struct termios term;
>
>      if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0)
>          return NULL;
>
> -    /* Set raw attributes on the pty. */
> -    cfmakeraw(&term);
> -    tcsetattr(slave_fd, TCSAFLUSH, &term);
> -
> -    fprintf(stderr, "char device redirected to %s\n",
ptsname(slave_fd));
> -    store_console_dev(domid, ptsname(slave_fd));
> +    slave_name = ptsname(master_fd);
> +    if (slave_name) {
> +       fprintf(stderr, "char device redirected to %s\n", slave_name);
> +       store_console_dev(domid, slave_name);
> +       /* Set raw attributes on the pty. */
> +        cfmakeraw(&term);
> +        tcsetattr(slave_fd, TCSAFLUSH, &term);
> +    } else {
> +        fprintf(logfile, "failed to redirect char device to pty");
> +    }
>
>      return qemu_chr_open_fd(master_fd, master_fd);
>  }

Thanks!  The patch gets my VMX domain to start booting.  Now I have to
figure out why it is running so s-----l-----o-----w-----l-----y.

Steve D.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.