On 11/23/18 at 05:28pm, Kairui Song wrote: > Some device (eg. hyperv_fb) will mimic EFI (or VESA) VGA on first boot > up, but after the real driver is loaded, it will switch to new mode > and no longer compatible with EFI/VESA VGA. Keep setting > orig_video_isVGA to EFI/VESA VGA flag will get wrong driver loaded and > try to manipulate the framebuffer in a wrong way. > > As we have already take care of "VESA VGA" and "EFI VGA", just set the > orig_video_isVGA to 0 for any other driver reports as EFI/VESA VGA but > is not EFI/VESA VGA. > > Signed-off-by: Kairui Song <kasong@xxxxxxxxxx> > --- > kexec/arch/i386/x86-linux-setup.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c > index dc785a2..a129812 100644 > --- a/kexec/arch/i386/x86-linux-setup.c > +++ b/kexec/arch/i386/x86-linux-setup.c > @@ -152,6 +152,11 @@ static int setup_linux_vesafb(struct x86_linux_param_header *real_mode) > err = get_bootparam(&real_mode->orig_video_isVGA, offset, 1); > if (err) > goto out; > + > + if (real_mode->orig_video_isVGA == 0x70 || real_mode->orig_video_isVGA == 0x23) { > + /* Clear isVGA flag for fb drivers that mimic EFI/VESA VGA */ > + real_mode->orig_video_isVGA = 0; > + } The blindly reuse original isVGA might be a problem like you said, but it does work for me for i915 laptop even if later drm driver loaded. With your patch it does not work anymore. kexec reboot with earlyprintk=efi without initramfs looks just hang, but previously I can see all the kernel console logs. Probably you can make real_mode->orig_video_isVGA = 0 as default in the else {} section, and introduce an extra x86 only argument for people to reuse isVGA blindly. eg. kexec --reuse-vga-type > } > close(fd); > > -- > 2.19.1 > > > _______________________________________________ > kexec mailing list > kexec@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/kexec Thanks Dave _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec