WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] There is a known "xm console" issue related with VMX. Wh

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] There is a known "xm console" issue related with VMX. When "serial" is
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 03 Feb 2006 19:24:09 +0000
Delivery-date: Fri, 03 Feb 2006 19:36:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User jrb44@xxxxxxxxxxxxxxxxx
# Node ID da62972434955d84e8f72fea7eee9fd342a5204a
# Parent  3d7ea7972b39fd276b56393f511742da45ec4d07
There is a known "xm console" issue related with VMX. When "serial" is 
enabled in script and no once uses "xm console" to read the console, 
VMX boting will hang due to the buffer is full.
I added a "select" before "write". If it could not be written, 
unix_write will Return immediately and it will not block the VMX 
booting. With this fix, we can  make VMX's serial enable by default.

Signed-off-by: Yu Ping <ping.y.yu@xxxxxxxxx>

Modified to patch xmexample.hvm. Put through xenrt on a VMX box.

Signed-off-by: James Bulpin <james@xxxxxxxxxxxxx>

diff -r 3d7ea7972b39 -r da6297243495 tools/examples/xmexample.hvm
--- a/tools/examples/xmexample.hvm      Thu Feb  2 17:16:00 2006
+++ b/tools/examples/xmexample.hvm      Thu Feb  2 18:15:22 2006
@@ -130,7 +130,7 @@
 #-----------------------------------------------------------------------------
 #   serial port re-direct to pty deivce, /dev/pts/n 
 #   then xm console or minicom can connect
-#serial='pty'
+serial='pty'
 
 #----------------------------------------------------------------------------
 # enable ne2000, default = 0(use pcnet)
diff -r 3d7ea7972b39 -r da6297243495 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Thu Feb  2 17:16:00 2006
+++ b/tools/ioemu/vl.c  Thu Feb  2 18:15:22 2006
@@ -957,19 +957,34 @@
 
 static int unix_write(int fd, const uint8_t *buf, int len1)
 {
-    int ret, len;
+    int ret,sel_ret,len;
+    int max_fd;
+    fd_set writefds;
+    struct timeval timeout;
+
+    max_fd = fd;  
 
     len = len1;
     while (len > 0) {
-        ret = write(fd, buf, len);
-        if (ret < 0) {
-            if (errno != EINTR && errno != EAGAIN)
-                return -1;
-        } else if (ret == 0) {
-            break;
-        } else {
-            buf += ret;
-            len -= ret;
+        FD_ZERO(&writefds);
+        FD_SET(fd, &writefds);
+       timeout.tv_sec = 0;
+       timeout.tv_usec = 0;
+       sel_ret = select(max_fd + 1, NULL, &writefds, 0, &timeout);
+       if (sel_ret <= 0) {
+               /* Timeout or select error */
+            return -1;
+       } else {
+            ret = write(fd, buf, len);
+            if (ret < 0) {
+                if (errno != EINTR && errno != EAGAIN)
+                    return -1;
+            } else if (ret == 0) {
+                   break;
+            } else {
+                   buf += ret;
+                    len -= ret;
+            }
         }
     }
     return len1 - len;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] There is a known "xm console" issue related with VMX. When "serial" is, Xen patchbot -unstable <=