xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* console: introduce console=none option
@ 2012-01-26 12:19 Andrew Cooper
  2012-01-26 14:41 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2012-01-26 12:19 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

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

XenServer by default boots without a serial console (buggy hardware
reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
writing to the vga text area looks ugly whilst dom0 is trying to set up
non-text mode and display  the splash screen.

We have been using "console=" to prevent this behavior for a while, but
presented herewith is a patch to fix the problem correctly.

~Andrew


[-- Attachment #2: console-param-none.patch --]
[-- Type: text/x-patch, Size: 1098 bytes --]

Console: introduce console=none command line parameter

Currenty, not specifying 'console=<foo>' on the command line causes
Xen to default to 'vga'.  Alternativly, the user can explicitly
specifiy 'console=vga|com1|com2'.

However, there is no way to specify that neither vga nor serial should
be used.  Specifying 'console=' does have the effect that neither vga
nor serial is set up, but at the cost of an "Bad console= option ''"
warning.

Therefore, expliticly support a 'console=none' option which does not
set up vga and does not set up serial, but does not trigger the bad
console warning.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r a2a8089b1ffb xen/drivers/char/console.c
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -549,6 +549,8 @@ void __init console_init_preirq(void)
             p++;
         if ( !strncmp(p, "vga", 3) )
             vga_init();
+        else if ( !strncmp(p, "none", 4) )
+            continue;
         else if ( strncmp(p, "com", 3) ||
                   (sercon_handle = serial_parse_handle(p)) == -1 )
         {

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 12:19 console: introduce console=none option Andrew Cooper
@ 2012-01-26 14:41 ` Jan Beulich
  2012-01-26 14:58   ` Andrew Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2012-01-26 14:41 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel@lists.xensource.com

>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> XenServer by default boots without a serial console (buggy hardware
> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
> writing to the vga text area looks ugly whilst dom0 is trying to set up
> non-text mode and display  the splash screen.
> 
> We have been using "console=" to prevent this behavior for a while, but
> presented herewith is a patch to fix the problem correctly.

While I don't mind the patch, I'm completely confused by the description:
Where is it that Xen writes to VGA text area after control was passed to
Dom0?

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 14:41 ` Jan Beulich
@ 2012-01-26 14:58   ` Andrew Cooper
  2012-01-26 16:00     ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2012-01-26 14:58 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel@lists.xensource.com

On 26/01/12 14:41, Jan Beulich wrote:
>>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> XenServer by default boots without a serial console (buggy hardware
>> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
>> writing to the vga text area looks ugly whilst dom0 is trying to set up
>> non-text mode and display  the splash screen.
>>
>> We have been using "console=" to prevent this behavior for a while, but
>> presented herewith is a patch to fix the problem correctly.
> While I don't mind the patch, I'm completely confused by the description:
> Where is it that Xen writes to VGA text area after control was passed to
> Dom0?
>
> Jan

I have not debugged it that much as I was looking for a clean solution
to our current hack of "console=" (and I have some rather more serious
deadlock bugs to debug), but it all Xen printk's are going into the VGA
text area, even after dom0 has started.  It is possible that Xen is
still writing into the text area after dom0 has switched VGA mode, but I
have no proof of this one way or the other.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 14:58   ` Andrew Cooper
@ 2012-01-26 16:00     ` Jan Beulich
  2012-01-26 16:08       ` Tim Deegan
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jan Beulich @ 2012-01-26 16:00 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel@lists.xensource.com

>>> On 26.01.12 at 15:58, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> On 26/01/12 14:41, Jan Beulich wrote:
>>>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>> XenServer by default boots without a serial console (buggy hardware
>>> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
>>> writing to the vga text area looks ugly whilst dom0 is trying to set up
>>> non-text mode and display  the splash screen.
>>>
>>> We have been using "console=" to prevent this behavior for a while, but
>>> presented herewith is a patch to fix the problem correctly.
>> While I don't mind the patch, I'm completely confused by the description:
>> Where is it that Xen writes to VGA text area after control was passed to
>> Dom0?
>>
>> Jan
> 
> I have not debugged it that much as I was looking for a clean solution
> to our current hack of "console=" (and I have some rather more serious
> deadlock bugs to debug), but it all Xen printk's are going into the VGA
> text area, even after dom0 has started.  It is possible that Xen is
> still writing into the text area after dom0 has switched VGA mode, but I
> have no proof of this one way or the other.

Just take a look at vga_endboot() - the output routine gets pointed to
vga_noop_puts() unless vgacon_keep. Beyond that point nothing
can possibly get printed to the VGA text screen, or if it does, then I'd
suspect there's some other change in XenServer that makes it so.

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 16:00     ` Jan Beulich
@ 2012-01-26 16:08       ` Tim Deegan
  2012-01-26 16:09       ` Ian Campbell
  2012-01-26 16:33       ` Andrew Cooper
  2 siblings, 0 replies; 7+ messages in thread
From: Tim Deegan @ 2012-01-26 16:08 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, xen-devel@lists.xensource.com

At 16:00 +0000 on 26 Jan (1327593636), Jan Beulich wrote:
> >>> On 26.01.12 at 15:58, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > On 26/01/12 14:41, Jan Beulich wrote:
> >>>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> >>> XenServer by default boots without a serial console (buggy hardware
> >>> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
> >>> writing to the vga text area looks ugly whilst dom0 is trying to set up
> >>> non-text mode and display  the splash screen.
> >>>
> >>> We have been using "console=" to prevent this behavior for a while, but
> >>> presented herewith is a patch to fix the problem correctly.
> >> While I don't mind the patch, I'm completely confused by the description:
> >> Where is it that Xen writes to VGA text area after control was passed to
> >> Dom0?
> >>
> >> Jan
> > 
> > I have not debugged it that much as I was looking for a clean solution
> > to our current hack of "console=" (and I have some rather more serious
> > deadlock bugs to debug), but it all Xen printk's are going into the VGA
> > text area, even after dom0 has started.  It is possible that Xen is
> > still writing into the text area after dom0 has switched VGA mode, but I
> > have no proof of this one way or the other.
> 
> Just take a look at vga_endboot() - the output routine gets pointed to
> vga_noop_puts() unless vgacon_keep. Beyond that point nothing
> can possibly get printed to the VGA text screen, or if it does, then I'd
> suspect there's some other change in XenServer that makes it so.

IIRC in some XenServer versions the bootloader also puts up a
splashscreen; that may be causing some confusion.

Tim.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 16:00     ` Jan Beulich
  2012-01-26 16:08       ` Tim Deegan
@ 2012-01-26 16:09       ` Ian Campbell
  2012-01-26 16:33       ` Andrew Cooper
  2 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2012-01-26 16:09 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, xen-devel@lists.xensource.com

On Thu, 2012-01-26 at 16:00 +0000, Jan Beulich wrote:
> >>> On 26.01.12 at 15:58, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > On 26/01/12 14:41, Jan Beulich wrote:
> >>>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> >>> XenServer by default boots without a serial console (buggy hardware
> >>> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
> >>> writing to the vga text area looks ugly whilst dom0 is trying to set up
> >>> non-text mode and display  the splash screen.
> >>>
> >>> We have been using "console=" to prevent this behavior for a while, but
> >>> presented herewith is a patch to fix the problem correctly.
> >> While I don't mind the patch, I'm completely confused by the description:
> >> Where is it that Xen writes to VGA text area after control was passed to
> >> Dom0?
> >>
> >> Jan
> > 
> > I have not debugged it that much as I was looking for a clean solution
> > to our current hack of "console=" (and I have some rather more serious
> > deadlock bugs to debug), but it all Xen printk's are going into the VGA
> > text area, even after dom0 has started.  It is possible that Xen is
> > still writing into the text area after dom0 has switched VGA mode, but I
> > have no proof of this one way or the other.
> 
> Just take a look at vga_endboot() - the output routine gets pointed to
> vga_noop_puts() unless vgacon_keep. Beyond that point nothing
> can possibly get printed to the VGA text screen, or if it does, then I'd
> suspect there's some other change in XenServer that makes it so.

IIRC the original purpose of this patch was to stop Xen from displaying
anything at all on the VGA, not just after dom0 handover but right from
start of day.

This was so that the splash screen (placed by the bootloader) didn't get
overwritten until dom0 comes up and takes over with the boot progress
meter thing.

Maybe that's changed in the meantime but that's my recollection.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: console: introduce console=none option
  2012-01-26 16:00     ` Jan Beulich
  2012-01-26 16:08       ` Tim Deegan
  2012-01-26 16:09       ` Ian Campbell
@ 2012-01-26 16:33       ` Andrew Cooper
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Cooper @ 2012-01-26 16:33 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Campbell, xen-devel@lists.xensource.com, Tim Deegan



On 26/01/12 16:00, Jan Beulich wrote:
>>>> On 26.01.12 at 15:58, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 26/01/12 14:41, Jan Beulich wrote:
>>>>>> On 26.01.12 at 13:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>> XenServer by default boots without a serial console (buggy hardware
>>>> reasons) and dom0 displays a splash screen.  Unfortunately, having Xen
>>>> writing to the vga text area looks ugly whilst dom0 is trying to set up
>>>> non-text mode and display  the splash screen.
>>>>
>>>> We have been using "console=" to prevent this behavior for a while, but
>>>> presented herewith is a patch to fix the problem correctly.
>>> While I don't mind the patch, I'm completely confused by the description:
>>> Where is it that Xen writes to VGA text area after control was passed to
>>> Dom0?
>>>
>>> Jan
>> I have not debugged it that much as I was looking for a clean solution
>> to our current hack of "console=" (and I have some rather more serious
>> deadlock bugs to debug), but it all Xen printk's are going into the VGA
>> text area, even after dom0 has started.  It is possible that Xen is
>> still writing into the text area after dom0 has switched VGA mode, but I
>> have no proof of this one way or the other.
> Just take a look at vga_endboot() - the output routine gets pointed to
> vga_noop_puts() unless vgacon_keep. Beyond that point nothing
> can possibly get printed to the VGA text screen, or if it does, then I'd
> suspect there's some other change in XenServer that makes it so.
>
> Jan

I have just been debugging this, and found that it got up to my debug
message of switching back to vga_noop_puts().

I know that this was called before dom0 started booting, but that it
appeared as if it was being written while dom0 was booting

It turns out that the problem is that after vesa_endboot zeros the
linear framebuffer, it does not call lfb_flush(), meaning that an sfence
does not occur, and presumably the actual linear framebuffer still has
Xen console text in it when dom0 takes over and sets it up.

Hacking an sfence into vesa_endboot() fixes the issue completely.

I shall roll a patch using lfb_flush() and post it shortly.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-26 16:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 12:19 console: introduce console=none option Andrew Cooper
2012-01-26 14:41 ` Jan Beulich
2012-01-26 14:58   ` Andrew Cooper
2012-01-26 16:00     ` Jan Beulich
2012-01-26 16:08       ` Tim Deegan
2012-01-26 16:09       ` Ian Campbell
2012-01-26 16:33       ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).