From patchwork Wed Nov 5 17:49:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 40218 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C4142404A for ; Wed, 5 Nov 2014 18:07:13 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id q1sf817757lam.0 for ; Wed, 05 Nov 2014 10:07:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:in-reply-to:message-id :references:user-agent:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type; bh=U2Gj0ev3Dwp4ImIsQn/0HsveYPetLZVgs31r6dW9iLs=; b=SYPZiWSJn3AuOBn+v0MzWg0qMedw/sJBA5ZgcyH3S5C3UCYzd0/FeEetkFQEJfVscU zPs6I3HrctHI7FNW3m876gf9C7HugBKD+k+QptJwtsaa+bb82uZYTijqacIgLdsBY1j1 OawsMR3MdOlBVgzVQqBsw+iyePqT2B5UNdwf5K0iSkQQ/rWXaR8NBdVUf5rpuocLJWPE x+K+yicqH6yZ81uGNRhP864o4dTbFY+IAhH2HSjMeKHvO621p1ejnoev5eVXgTDUDDVa 5JQOz2RYItRyUIite3KKDPTJ1zMXWl8Q1YRrBP/poBLXPcYeJskty7Y+gAZvALkXrGcs 8K7Q== X-Gm-Message-State: ALoCoQmktQ2FKyB1in9q78HQSYE9Eqi0Pei53CzwVBK305KnJ77LnTM8/Kx16dlPqdOPnDkRQCl4 X-Received: by 10.112.254.226 with SMTP id al2mr10093671lbd.1.1415210831904; Wed, 05 Nov 2014 10:07:11 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.203 with SMTP id xu11ls627493lab.90.gmail; Wed, 05 Nov 2014 10:07:11 -0800 (PST) X-Received: by 10.112.132.34 with SMTP id or2mr70399524lbb.75.1415210831681; Wed, 05 Nov 2014 10:07:11 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id uc5si7584513lbb.31.2014.11.05.10.07.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Nov 2014 10:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gm9so1144837lab.5 for ; Wed, 05 Nov 2014 10:07:11 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr33891602lbo.32.1415210831355; Wed, 05 Nov 2014 10:07:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp328123lbc; Wed, 5 Nov 2014 10:07:10 -0800 (PST) X-Received: by 10.52.82.103 with SMTP id h7mr5994182vdy.27.1415210819450; Wed, 05 Nov 2014 10:06:59 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k4si3606864vci.20.2014.11.05.10.06.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 05 Nov 2014 10:06:59 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xm4we-0003pf-Ed; Wed, 05 Nov 2014 18:04:36 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xm4wd-0003pa-Lw for xen-devel@lists.xen.org; Wed, 05 Nov 2014 18:04:35 +0000 Received: from [85.158.143.35] by server-1.bemta-4.messagelabs.com id 2F/07-09842-2B66A545; Wed, 05 Nov 2014 18:04:34 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-8.tower-21.messagelabs.com!1415210664!13049796!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, ML_RADAR_SPEW_LINKS_8, spamassassin: , async_handler: YXN5bmNfZGVsYXk6IDcwNTg3ODYgKHRpbWVvdXQp\n X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 2206 invoked from network); 5 Nov 2014 18:04:25 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 5 Nov 2014 18:04:25 -0000 X-IronPort-AV: E=Sophos;i="5.07,321,1413244800"; d="scan'208";a="188431776" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 5 Nov 2014 13:03:33 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Xm4iW-0004yK-Gu; Wed, 05 Nov 2014 17:50:00 +0000 Date: Wed, 5 Nov 2014 17:49:53 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Steven Haigh In-Reply-To: <5447D30A.4040704@crc.id.au> Message-ID: References: <544678FE.2000801@crc.id.au> <5446CF1D.6030307@crc.id.au> <1413968436.20604.53.camel@citrix.com> <20141022095906.GG3659@type.bordeaux.inria.fr> <1413974439.18118.1.camel@citrix.com> <1413979542.19198.14.camel@citrix.com> <5447CBE4.6090104@crc.id.au> <1413992405.19198.24.camel@citrix.com> <5447D30A.4040704@crc.id.au> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: Anthony Perard , Samuel Thibault , xen-devel@lists.xen.org, Ian Campbell , Stefano Stabellini Subject: Re: [Xen-devel] vnc=1 / pvgrub / close fb: backend at /local/domain/0/backend/vfb/xx/0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Hello Steven, I have found some time to debug this myself. I couldn't reproduce the booting issue that you reported: in my case after seeing the grub boot menu I can successfully boot the kernel without problems. However I can reproduce the timeout issue that you are seeing: the timeout doesn't work properly in graphics mode. The reason is that the with a graphics terminal you checkkey () return 0 even when pressing no keys, resulting in wrong behaviour in run_menu. Does the following patch (also attached) fixes your issues? On Thu, 23 Oct 2014, Steven Haigh wrote: > On 23/10/2014 2:40 AM, Ian Campbell wrote: > > On Thu, 2014-10-23 at 02:23 +1100, Steven Haigh wrote: > > > >> Output using pv-grub: > > > > Can you also post the qemu logs please (under /var/log/xen somewhere I > > think). > > I get very little out of this: > -rw-r--r-- 1 root root 0 Oct 23 02:45 qemu-dm-dev.vm.log > -rw-r--r-- 1 root root 0 Oct 23 02:44 xen-hotplug.log > -rw-r--r-- 1 root root 55 Oct 23 02:45 xl-dev.vm.log > [root@dom0 xen]# cat xl-dev.vm.log > Waiting for domain dev.vm (domid 36) to die [pid 6970] > > That's it :\ > > >> qemu-system-i38[3956]: segfault at 0 ip (null) sp > >> 00007fffb4573638 error 4 > > > > That might be a smoking gun. Is there a core dump and/or could you try > > and run qemu under gdb? > > Any hints on doing this? I can't say I'm a gdb guru.... I can't find any > core dumps anywhere so that's not really helpful... > > -- > Steven Haigh > > Email: netwiz@crc.id.au > Web: http://www.crc.id.au > Phone: (03) 9001 6090 - 0412 935 897 > > diff --git a/stubdom/grub.patches/11graphics-keyboard.diff b/stubdom/grub.patches/11graphics-keyboard.diff new file mode 100644 index 0000000..fe17b20 --- /dev/null +++ b/stubdom/grub.patches/11graphics-keyboard.diff @@ -0,0 +1,13 @@ +diff --git a/stage2/stage2.c b/stage2/stage2.c +index 9d9fcc3..8353a3b 100644 +--- a/stage2/stage2.c ++++ b/stage2/stage2.c +@@ -395,7 +395,7 @@ restart: + pressed. + This avoids polling (relevant in the grub-shell and later on + in grub if interrupt driven I/O is done). */ +- if (checkkey () >= 0 || grub_timeout < 0) ++ if (checkkey () > 0 || grub_timeout < 0) + { + /* Key was pressed, show which entry is selected before GETKEY, + since we're comming in here also on GRUB_TIMEOUT == -1 and diff --git a/stubdom/grub.patches/11graphics-keyboard.diff b/stubdom/grub.patches/11graphics-keyboard.diff new file mode 100644 index 0000000..fe17b20 --- /dev/null +++ b/stubdom/grub.patches/11graphics-keyboard.diff @@ -0,0 +1,13 @@ +diff --git a/stage2/stage2.c b/stage2/stage2.c +index 9d9fcc3..8353a3b 100644 +--- a/stage2/stage2.c ++++ b/stage2/stage2.c +@@ -395,7 +395,7 @@ restart: + pressed. + This avoids polling (relevant in the grub-shell and later on + in grub if interrupt driven I/O is done). */ +- if (checkkey () >= 0 || grub_timeout < 0) ++ if (checkkey () > 0 || grub_timeout < 0) + { + /* Key was pressed, show which entry is selected before GETKEY, + since we're comming in here also on GRUB_TIMEOUT == -1 and