summaryrefslogtreecommitdiff
path: root/kexec/arch/x86_64/kexec-x86_64.c
diff options
context:
space:
mode:
authorKairui Song <kasong@redhat.com>2019-03-05 19:34:33 +0800
committerSimon Horman <horms@verge.net.au>2019-03-06 13:50:08 +0100
commitfb5a8792e6e4ee7de7ae3e06d193ea5beaaececc (patch)
tree98b912b123e2f338222b64ab7f88f987662aecf7 /kexec/arch/x86_64/kexec-x86_64.c
parent3757ef630b72385157c02439dd633399a4f43f45 (diff)
x86: Introduce a new option --reuse-video-type
After commit 060eee58 "x86: use old screen_info if needed", kexec-tools will force use old screen_info and vga type if failed to determine current vga type. But it is not always a good idea. Currently kernel hanging is inspected on some hyper-v VMs after this commit, because 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. We can't ensure this won't happen on other framebuffer drivers, But it's a helpful feature if the framebuffer drivers just work. So this patch introduce a --reuse-video-type options to let user decide if the old screen_info hould be used unconditional or not. Signed-off-by: Kairui Song <kasong@redhat.com> Reviewed-by: Dave Young <dyoung@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/x86_64/kexec-x86_64.c')
-rw-r--r--kexec/arch/x86_64/kexec-x86_64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c
index 041b007..ccdc980 100644
--- a/kexec/arch/x86_64/kexec-x86_64.c
+++ b/kexec/arch/x86_64/kexec-x86_64.c
@@ -55,6 +55,7 @@ void arch_usage(void)
" --console-serial Enable the serial console\n"
" --pass-memmap-cmdline Pass memory map via command line in kexec on panic case\n"
" --noefi Disable efi support\n"
+ " --reuse-video-type Reuse old boot time video type blindly\n"
);
}
@@ -67,6 +68,7 @@ struct arch_options_t arch_options = {
.core_header_type = CORE_TYPE_ELF64,
.pass_memmap_cmdline = 0,
.noefi = 0,
+ .reuse_video_type = 0,
};
int arch_process_options(int argc, char **argv)
@@ -136,6 +138,9 @@ int arch_process_options(int argc, char **argv)
case OPT_NOEFI:
arch_options.noefi = 1;
break;
+ case OPT_REUSE_VIDEO_TYPE:
+ arch_options.reuse_video_type = 1;
+ break;
}
}
/* Reset getopt for the next pass; called in other source modules */