Skip to contentSkip to conversation

enable xm console for vmx guest

PATCH Superseded Ling, Xiaofeng 2 participants 3 messages Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enable xm console for vmx guest

Enable xm console for vmx guest.
When the serial port is redirect to pty, write the allocated device to xenstore, then xm console can get it. TODO:serial port by pty shall not block if there are no reading on the other end

# HG changeset patch
# User Xiaofeng Ling <[email protected]>
# Node ID 34d300132f3b4dc3944fbe980c97b84671c40e46
# Parent 1e82f5c841ac5cac5598040a5bc305835ff2965c Enable xm console for vmx guest.
When the serial port is redirect to pty, write the allocated device to xenstore, then xm console can get it. TODO:serial port by pty shall not block if there are no reading on the other end

tools/examples/xmexample.vmx +5 -0
diff -r 1e82f5c841ac -r 34d300132f3b tools/examples/xmexample.vmx
@@ -117,6 +117,11 @@
 #nographic=0
 
 
+#-----------------------------------------------------------------------------
+#   serial port re-direct to pty deivce, /dev/pts/n 
+#   then xm console or minicom can connect
+#serial='pty'
+
 #----------------------------------------------------------------------------
 # enable ne2000, default = 0(use pcnet)
 ne2000=0
tools/ioemu/target-i386-dm/Makefile +2 -2
diff -r 1e82f5c841ac -r 34d300132f3b tools/ioemu/target-i386-dm/Makefile
@@ -7,7 +7,7 @@
 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
-DEFINES+= -I$(XEN_ROOT)/tools/libxc
+DEFINES+= -I$(XEN_ROOT)/tools/libxc -I$(XEN_ROOT)/tools/xenstore
 ifdef CONFIG_USER_ONLY
 VPATH+=:$(SRC_PATH)/linux-user
 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
@@ -188,7 +188,7 @@
 #########################################################
 
 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DAPIC_SUPPORT
-LIBS+=-lm -L../../libxc -lxenctrl
+LIBS+=-lm -L../../libxc -lxenctrl -L../../xenstore -lxenstore
 ifndef CONFIG_USER_ONLY
 LIBS+=-lz
 endif
tools/ioemu/vl.c +46 -1

71 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 7 lines · Xiaofeng

Enable xm console for vmx guest.
When the serial port is redirect to pty, write the allocated device to xenstore, then xm console can get it. TODO:serial port by pty shall not block if there are no reading on the other end

Hi,

I believe that you must free() path in store_console_dev() when you're done with it:

from xs.h:

/* Query the home path of a domain. Call free() after use. */
char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);

Thanks,

Dan

#2 lore raw

Yes, thanks for pointing out. I've updated in the attach patch.

----- Original Message -----
From: "Daniel Stekloff" <[email protected]>
To: <[email protected]>
Cc: "Ling, Xiaofeng" <[email protected]>
Sent: Monday, November 07, 2005 2:10 PM
Subject: Re: [Xen-devel] [PATCH] enable xm console for vmx guest

Quoted 7 lines · Xiaofeng
Quoted 6 lines

Enable xm console for vmx guest.
When the serial port is redirect to pty, write the allocated device to xenstore, then xm console can get it. TODO:serial port by pty shall not block if there are no reading on the other end

Quoted 5 lines
Quoted 1 line

Hi,

I believe that you must free() path in store_console_dev() when you're

done

Quoted 8 lines

with it:

from xs.h:

/* Query the home path of a domain. Call free() after use. */
char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);

Quoted 9 lines

Thanks,

Dan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

# HG changeset patch
# User Xiaofeng Ling <[email protected]>
# Node ID 34d300132f3b4dc3944fbe980c97b84671c40e46
# Parent 1e82f5c841ac5cac5598040a5bc305835ff2965c Enable xm console for vmx guest.
When the serial port is redirect to pty, write the allocated device to xenstore, then xm console can get it. TODO:serial port by pty shall not block if there are no reading on the other end

tools/examples/xmexample.vmx +5 -0
diff -r 01a959ee39dd tools/examples/xmexample.vmx
@@ -117,6 +117,11 @@
 #nographic=0
 
 
+#-----------------------------------------------------------------------------
+#   serial port re-direct to pty deivce, /dev/pts/n 
+#   then xm console or minicom can connect
+#serial='pty'
+
 #----------------------------------------------------------------------------
 # enable ne2000, default = 0(use pcnet)
 ne2000=0
tools/ioemu/target-i386-dm/Makefile +2 -2
diff -r 01a959ee39dd tools/ioemu/target-i386-dm/Makefile
@@ -7,7 +7,7 @@
 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
-DEFINES+= -I$(XEN_ROOT)/tools/libxc
+DEFINES+= -I$(XEN_ROOT)/tools/libxc -I$(XEN_ROOT)/tools/xenstore
 ifdef CONFIG_USER_ONLY
 VPATH+=:$(SRC_PATH)/linux-user
 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
@@ -188,7 +188,7 @@
 #########################################################
 
 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-LIBS+=-lm -L../../libxc -lxenctrl
+LIBS+=-lm -L../../libxc -lxenctrl -L../../xenstore -lxenstore
 ifndef CONFIG_USER_ONLY
 LIBS+=-lz
 endif
tools/ioemu/vl.c +46 -1

71 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel