x86/pvh: Override opt_console_xen earlier
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Apr 2020 12:19:15 +0000 (13:19 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Apr 2020 20:31:48 +0000 (21:31 +0100)
This allows printk() to work from the start of day, and backtraces from as
early as the IDT is set up.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
xen/arch/x86/boot/head.S
xen/arch/x86/setup.c

index 153a53f25029f6e15931f8c75714682bd181f4f0..150f7f90a26506e7899e2a95341c42b18c020983 100644 (file)
@@ -402,6 +402,9 @@ __pvh_start:
 
         mov     %ebx, sym_esi(pvh_start_info_pa)
 
+        /* Force xen console.  Will revert to user choice in init code. */
+        movb    $-1, sym_esi(opt_console_xen)
+
         /* Prepare gdt and segments */
         add     %esi, sym_esi(gdt_boot_base)
         lgdt    sym_esi(gdt_boot_descr)
index 885919d5c3c4d6f200bfed123e291f62c36ff84b..eb56d78c2fbec3c7feb9bee26d08254bbb85ddcc 100644 (file)
@@ -728,11 +728,6 @@ void __init noreturn __start_xen(unsigned long mbi_p)
 
     if ( pvh_boot )
     {
-        /*
-         * Force xen console to be enabled. We will reset it later in console
-         * initialisation code.
-         */
-        opt_console_xen = -1;
         ASSERT(mbi_p == 0);
         pvh_init(&mbi, &mod);
     }