Skip to contentSkip to conversation

vl: initialize displays _after_ exiting preconfiguration

PATCH In review Paolo Bonzini 2 participants 4 messages Dec 17, 2020 – Jan 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vl: initialize displays _after_ exiting preconfiguration

Due to the renumbering of text consoles when graphical consoles are created, init_displaystate must be called after all QemuConsoles are created, i.e. after devices are created.

vl.c calls it from qemu_init_displays, while qmp_x_exit_preconfig is where devices are created. If qemu_init_displays is called before it, the VGA graphical console does not come up.

---
 softmmu/vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/vl.c +1 -1
index 0ed5c5ba93..7ddf405d76 100644
@@ -3529,10 +3529,10 @@ void qemu_init(int argc, char **argv, char **envp)
         exit(0);
     }
 
-    qemu_init_displays();
     if (!preconfig_requested) {
         qmp_x_exit_preconfig(&error_fatal);
     }
+    qemu_init_displays();
     accel_setup_post(current_machine);
     os_setup_post();
     resume_mux_open();
Signature · 1 line
2.29.2
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Paolo Bonzini

Due to the renumbering of text consoles when graphical consoles are created, init_displaystate must be called after all QemuConsoles are created, i.e. after devices are created.

vl.c calls it from qemu_init_displays, while qmp_x_exit_preconfig is where devices are created. If qemu_init_displays is called before it, the VGA graphical console does not come up.

This still seems to be missing from master, who should take care of this?

Regards,
BALATON Zoltan

Quoted 23 lines

---
softmmu/vl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/vl.c +1 -1
index 0ed5c5ba93..7ddf405d76 100644
@@ -3529,10 +3529,10 @@ void qemu_init(int argc, char **argv, char **envp)
        exit(0);
    }
 
-    qemu_init_displays();
    if (!preconfig_requested) {
        qmp_x_exit_preconfig(&error_fatal);
    }
+    qemu_init_displays();
    accel_setup_post(current_machine);
    os_setup_post();
    resume_mux_open();
#2 lore raw

Il mer 6 gen 2021, 18:06 BALATON Zoltan <[email protected]> ha scritto:

Quoted 5 lines · Paolo Bonzini
Quoted 4 lines

Due to the renumbering of text consoles when graphical consoles are created, init_displaystate must be called after all QemuConsoles are created, i.e. after devices are created.

Quoted 8 lines
Quoted 3 lines

vl.c calls it from qemu_init_displays, while qmp_x_exit_preconfig is where devices are created. If qemu_init_displays is called before it, the VGA graphical console does not come up.

This still seems to be missing from master, who should take care of this?

It's in now, I think.

Paolo

Quoted 29 lines

Regards,
BALATON Zoltan

softmmu/vl.c void qemu_init(int argc, char **argv, char

Quoted 11 lines

---
softmmu/vl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/vl.c +0 -0
index 0ed5c5ba93..7ddf405d76 100644
@@ -3529,10 +3529,10 @@ void qemu_init(int argc, char **argv, char

**envp)

Quoted 12 lines
softmmu/vl.c +1 -1
        exit(0);
    }
 
-    qemu_init_displays();
    if (!preconfig_requested) {
        qmp_x_exit_preconfig(&error_fatal);
    }
+    qemu_init_displays();
    accel_setup_post(current_machine);
    os_setup_post();
    resume_mux_open();
#3 lore raw
Quoted 11 lines · Paolo Bonzini

Il mer 6 gen 2021, 18:06 BALATON Zoltan <[email protected]> ha scritto:

Quoted 9 lines · Paolo Bonzini
Quoted 7 lines

Due to the renumbering of text consoles when graphical consoles are created, init_displaystate must be called after all QemuConsoles are created, i.e. after devices are created.

vl.c calls it from qemu_init_displays, while qmp_x_exit_preconfig is where devices are created. If qemu_init_displays is called before it, the VGA graphical console does not come up.

Quoted 6 lines
Quoted 4 lines

This still seems to be missing from master, who should take care of this?

It's in now, I think.

Yes, got merges with the misc fixes series.

Thanks,
BALATON Zoltan

Quoted 33 lines

Paolo

Quoted 29 lines

Regards,
BALATON Zoltan

softmmu/vl.c void qemu_init(int argc, char **argv, char

Quoted 11 lines

---
softmmu/vl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/vl.c +0 -0
index 0ed5c5ba93..7ddf405d76 100644
@@ -3529,10 +3529,10 @@ void qemu_init(int argc, char **argv, char

**envp)

Quoted 12 lines
softmmu/vl.c +1 -1
        exit(0);
    }
 
-    qemu_init_displays();
    if (!preconfig_requested) {
        qmp_x_exit_preconfig(&error_fatal);
    }
+    qemu_init_displays();
    accel_setup_post(current_machine);
    os_setup_post();
    resume_mux_open();