[Pkg-xen-devel] xen 2.6.26 on amd64 console troubles

Ian Campbell ijc at hellion.org.uk
Thu Oct 16 21:50:45 UTC 2008


On Thu, 2008-10-16 at 22:47 +0200, Bastian Blank wrote:
> On Thu, Oct 16, 2008 at 09:38:58PM +0100, Ian Campbell wrote:
> > On Thu, 2008-10-16 at 20:52 +0200, Bastian Blank wrote: 
> > > I'm not able to get a console using xencons=off
> > > console=hvc0. I would have been surprised anyway as the hvc_xen driver
> > > is disabled by the patch.
> > I'd guess it won't be as simple as removing this bit of Kconfig.
> 
> Nope. I already tried and only partially succeeded. To be exact:
> console via xenconsoled works, via hypervisor not.

How about something like this would work as a skanky hack to unify the
names at least. (it doesn't actually work for some reason, I suspect
it's trivial but it's late so I'll look into it over the weekend)

--- drivers/xen/console/console.c.orig	2008-10-16 19:33:22.000000000 +0100
+++ drivers/xen/console/console.c	2008-10-16 22:35:57.000000000 +0100
@@ -66,20 +66,25 @@
  *  'xencons=tty'  [XC_TTY]:     Console attached to '/dev/tty[0-9]+'.
  *  'xencons=ttyS' [XC_SERIAL]:  Console attached to '/dev/ttyS[0-9]+'.
  *  'xencons=xvc'  [XC_XVC]:     Console attached to '/dev/xvc0'.
- *  default:                     XC_XVC
+ *  'xencons=hvc'  [XC_HVC]:     Console attached to '/dev/hvc0'.
+ *  default:                     XC_HVC
  * 
  * NB. In mode XC_TTY, we create dummy consoles for tty2-63. This suppresses
  * warnings from standard distro startup scripts.
  */
 static enum {
-	XC_OFF, XC_TTY, XC_SERIAL, XC_XVC
-} xc_mode = XC_XVC;
+	XC_OFF, XC_TTY, XC_SERIAL, XC_XVC, XC_HVC
+} xc_mode = XC_HVC;
 static int xc_num = -1;
 
 /* /dev/xvc0 device number allocated by lanana.org. */
 #define XEN_XVC_MAJOR 204
 #define XEN_XVC_MINOR 191
 
+/* /dev/hvc0 device number */
+#define XEN_HVC_MAJOR 229
+#define XEN_HVC_MINOR 0
+
 static int __init xencons_setup(char *str)
 {
 	char *q;
@@ -97,6 +102,9 @@
 	} else if (!strncmp(str, "xvc", 3)) {
 		xc_mode = XC_XVC;
 		str += 3;
+	} else if (!strncmp(str, "hvc", 3)) {
+		xc_mode = XC_HVC;
+		str += 3;
 	} else if (!strncmp(str, "off", 3)) {
 		xc_mode = XC_OFF;
 		str += 3;
@@ -205,6 +213,12 @@
 			xc_num = 0;
 		break;
 
+	case XC_HVC:
+		strcpy(kcons_info.name, "hvc");
+		if (xc_num == -1)
+			xc_num = 0;
+		break;
+
 	case XC_SERIAL:
 		strcpy(kcons_info.name, "ttyS");
 		if (xc_num == -1)
@@ -681,6 +695,12 @@
 		DRV(xencons_driver)->minor_start = XEN_XVC_MINOR;
 		DRV(xencons_driver)->name_base   = xc_num;
 		break;
+	case XC_HVC:
+		DRV(xencons_driver)->name        = "hvc";
+		DRV(xencons_driver)->major       = XEN_HVC_MAJOR;
+		DRV(xencons_driver)->minor_start = XEN_HVC_MINOR;
+		DRV(xencons_driver)->name_base   = xc_num;
+		break;
 	case XC_SERIAL:
 		DRV(xencons_driver)->name        = "ttyS";
 		DRV(xencons_driver)->minor_start = 64 + xc_num;

-- 
Ian Campbell

Breakpoint 1, main (argc=1, argv=0xbffffc40) at main.c:29
29   printf ("Welcome to GNU Hell!\n");
		-- "GNU Libtool documentation"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081016/5e5bd4b2/attachment.pgp 


More information about the Pkg-xen-devel mailing list