All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Katz <katzj@redhat.com>
To: xen-devel <xen-devel@lists.xensource.com>
Cc: Ian Pratt <ian.pratt@xensource.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Christian Limpach <chris@xensource.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] Paravirt framebuffer: Use only if requested [6/6]
Date: Fri, 18 Aug 2006 17:15:53 -0400	[thread overview]
Message-ID: <1155935753.11663.58.camel@aglarond.local> (raw)
In-Reply-To: <1155935119.11663.54.camel@aglarond.local>

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Fri, 2006-08-18 at 17:05 -0400, Jeremy Katz wrote:
> If we're not set up to use a graphical console for the guest, then we
> need to ensure that the xvc console ends up as the primary console.
> This also should make it so that we can lose the console_use_vt bits.
> 
> Signed-off-by: Jeremy Katz <katzj@redhat.com>

Helps to attach it...

Jeremy

[-- Attachment #2: xen-pvfb-6.patch --]
[-- Type: text/x-patch, Size: 2516 bytes --]

diff -r e1df81251b97 -r fccccf63eb85 linux-2.6-xen-sparse/drivers/xen/console/console.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Fri Aug 18 16:29:50 2006 -0400
+++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Fri Aug 18 16:31:16 2006 -0400
@@ -663,6 +663,20 @@ static int __init xencons_init(void)
 	printk("Xen virtual console successfully installed as %s%d\n",
 	       DRV(xencons_driver)->name, xc_num);
 
+        /* Don't need to check about graphical fb for domain 0 */
+        if (is_initial_xendomain())
+	  return 0;
+
+	rc = 0;
+	if (xenbus_scanf(XBT_NIL, "console", "use_graphics", "%d", &rc) < 0)
+		printk(KERN_ERR "Unable to read console/use_graphics\n");
+	if (rc == 0) {
+               /* FIXME: this is ugly */
+	       unregister_console(&kcons_info);
+	       kcons_info.flags |= CON_CONSDEV;
+	       register_console(&kcons_info);
+	}
+
 	return 0;
 }
 
diff -r fccccf63eb85 -r e1f90db3f153 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c	Fri Aug 18 16:31:16 2006 -0400
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c	Fri Aug 18 16:31:31 2006 -0400
@@ -1873,9 +1873,6 @@ void __init setup_arch(char **cmdline_p)
 	} else {
 #if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
 		conswitchp = &dummy_con;
-#else
-		extern int console_use_vt;
-		console_use_vt = 0;
 #endif
 	}
 }
diff -r fccccf63eb85 -r e1f90db3f153 linux-2.6-xen-sparse/drivers/char/tty_io.c
--- a/linux-2.6-xen-sparse/drivers/char/tty_io.c	Fri Aug 18 16:31:16 2006 -0400
+++ b/linux-2.6-xen-sparse/drivers/char/tty_io.c	Fri Aug 18 16:31:31 2006 -0400
@@ -132,8 +132,6 @@ LIST_HEAD(tty_drivers);			/* linked list
    vt.c for deeply disgusting hack reasons */
 DECLARE_MUTEX(tty_sem);
 
-int console_use_vt = 1;
-
 #ifdef CONFIG_UNIX98_PTYS
 extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
 extern int pty_limit;		/* Config limit on Unix98 ptys */
@@ -2056,7 +2054,7 @@ retry_open:
 		goto got_driver;
 	}
 #ifdef CONFIG_VT
-	if (console_use_vt && (device == MKDEV(TTY_MAJOR,0))) {
+	if (device == MKDEV(TTY_MAJOR,0)) {
 		extern struct tty_driver *console_driver;
 		driver = console_driver;
 		index = fg_console;
@@ -3243,8 +3241,6 @@ static int __init tty_init(void)
 #endif
 
 #ifdef CONFIG_VT
-	if (!console_use_vt)
-		goto out_vt;
 	cdev_init(&vc0_cdev, &console_fops);
 	if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
 	    register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2006-08-18 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 21:05 [PATCH] Paravirt framebuffer: Use only if requested [6/6] Jeremy Katz
2006-08-18 21:15 ` Jeremy Katz [this message]
2006-08-21 14:18   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1155935753.11663.58.camel@aglarond.local \
    --to=katzj@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=chris@xensource.com \
    --cc=ian.pratt@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.