Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
kdump
kdump-no-xen-secondary-kernel.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-no-xen-secondary-kernel.patch of Package kdump
From: Petr Tesarik <ptesarik@suse.com> Subject: Avoid Xen kernels as kdump kernel References: bsc#900418, bsc#974270 Patch-mainline: not yet Since Xen kernels cannot run on bare metal, they must be avoided as a secondary kernel. Signed-off-by: Petr Tesarik <ptesarik@suse.com> --- kdumptool/findkernel.cc | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) --- a/kdumptool/findkernel.cc +++ b/kdumptool/findkernel.cc @@ -130,14 +130,33 @@ bool FindKernel::suitableForKdump(const } } + Kconfig *kconfig = kt.retrieveKernelConfig(); + KconfigValue kv; + bool isxen; + + // Avoid Xenlinux kernels, because they do not run on bare metal + kv = kconfig->get("CONFIG_X86_64_XEN"); + isxen = (kv.getType() == KconfigValue::T_TRISTATE && + kv.getTristateValue() == KconfigValue::ON); + if (!isxen) { + kv = kconfig->get("CONFIG_X86_XEN"); + isxen = (kv.getType() == KconfigValue::T_TRISTATE && + kv.getTristateValue() == KconfigValue::ON); + } + if (isxen) { + Debug::debug()->dbg("%s is a Xen kernel. Avoid.", + kernelImage.c_str()); + delete kconfig; + return false; + } + if (strict) { string arch = Util::getArch(); - Kconfig *kconfig = kt.retrieveKernelConfig(); // avoid large number of CPUs on x86 since that increases // memory size constraints of the capture kernel if (arch == "i386" || arch == "x86_64") { - KconfigValue kv = kconfig->get("CONFIG_NR_CPUS"); + kv = kconfig->get("CONFIG_NR_CPUS"); if (kv.getType() == KconfigValue::T_INTEGER && kv.getIntValue() > MAXCPUS_KDUMP) { Debug::debug()->dbg("NR_CPUS of %s is %d >= %d. Avoid.", @@ -148,17 +167,17 @@ bool FindKernel::suitableForKdump(const } // avoid realtime kernels - KconfigValue kv = kconfig->get("CONFIG_PREEMPT_RT"); + kv = kconfig->get("CONFIG_PREEMPT_RT"); if (kv.getType() != KconfigValue::T_INVALID) { Debug::debug()->dbg("%s is realtime kernel. Avoid.", kernelImage.c_str()); delete kconfig; return false; } - - delete kconfig; } + delete kconfig; + return true; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor