From: Jeremy Katz Subject: [PATCH] Paravirt framebuffer not-used fixes [5/6] Date: Fri, 18 Aug 2006 17:05:17 -0400 Message-ID: <1155935117.11663.53.camel@aglarond.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-mpxcvSGZl8eysE1LMAsI" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Ian Pratt , Anthony Liguori , Markus Armbruster , Christian Limpach List-Id: xen-devel@lists.xenproject.org --=-mpxcvSGZl8eysE1LMAsI Content-Type: text/plain Content-Transfer-Encoding: 7bit Don't initialize xenfb or xenkbd in dom0 or if our domain isn't set up to use a graphical console Signed-off-by: Jeremy Katz Jeremy --=-mpxcvSGZl8eysE1LMAsI Content-Disposition: attachment; filename=xen-pvfb-5.patch Content-Type: text/x-patch; name=xen-pvfb-5.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r d49bc30b6b27 -r e1df81251b97 linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c --- a/linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c Fri Aug 18 16:26:39 2006 -0400 +++ b/linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c Fri Aug 18 16:29:50 2006 -0400 @@ -369,6 +369,15 @@ static int __init xenfb_probe(void) struct fb_info *fb_info; struct evtchn_alloc_unbound alloc_unbound; struct xenbus_transaction xbt; + + /* Nothing to do if running in dom0. */ + if (is_initial_xendomain()) + return -ENODEV; + /* if we're not set up to use graphics mode, then don't initialize */ + if (xenbus_scanf(XBT_NIL, "console", "use_graphics", "%d", &ret) < 0) + return -ENODEV; + if (ret == 0) + return -ENODEV; info = kmalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) diff -r d49bc30b6b27 -r e1df81251b97 linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c --- a/linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c Fri Aug 18 16:26:39 2006 -0400 +++ b/linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c Fri Aug 18 16:29:50 2006 -0400 @@ -80,6 +80,15 @@ int __init xenkbd_init(void) struct input_dev *input_dev; struct evtchn_alloc_unbound alloc_unbound; struct xenbus_transaction xbt; + + /* Nothing to do if running in dom0. */ + if (is_initial_xendomain()) + return -ENODEV; + /* if we're not set up to use graphics mode, then don't initialize */ + if (xenbus_scanf(XBT_NIL, "console", "use_graphics", "%d", &ret) < 0) + return -ENODEV; + if (ret == 0) + return -ENODEV; dev = kmalloc(sizeof(*dev), GFP_KERNEL); input_dev = input_allocate_device(); --=-mpxcvSGZl8eysE1LMAsI Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-mpxcvSGZl8eysE1LMAsI--