x86/Xen: further refine add_preferred_console() invocations
authorJan Beulich <JBeulich@suse.com>
Mon, 25 Jun 2018 10:45:49 +0000 (04:45 -0600)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 20 Aug 2018 18:46:18 +0000 (14:46 -0400)
As the sequence of invocations matters, add "tty" only after "hvc" when
a VGA console is available (which is often the case for Dom0, but hardly
ever for DomU).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/enlighten_pv.c

index 419ff4641644663f98653dc2695a51118564dd3b..a26a11d8d0eb13f19de41ba9a3b9657c750075a5 100644 (file)
@@ -1385,8 +1385,11 @@ asmlinkage __visible void __init xen_start_kernel(void)
                xen_boot_params_init_edd();
        }
 
-       add_preferred_console("tty", 0, NULL);
+       if (!boot_params.screen_info.orig_video_isVGA)
+               add_preferred_console("tty", 0, NULL);
        add_preferred_console("hvc", 0, NULL);
+       if (boot_params.screen_info.orig_video_isVGA)
+               add_preferred_console("tty", 0, NULL);
 
 #ifdef CONFIG_PCI
        /* PCI BIOS service won't work from a PV guest. */