Unnamed repository
9df0cbbeed
We met a problem on AMD machines, when using "nr_cpus=4" for kdump, and crash happens on cpus other than cpu0, kdump kernel will fail to boot and eventually reset. After some debugging, we found that it stuck at the kernel path do_boot_cpu()-> ... ->wakeup_secondary_cpu_via_init(): apic_icr_write(APIC_INT_LEVELTRIG|APIC_INT_ASSERT|APIC_DM_INIT, phys_apicid); that is, it stuck at sending INIT from AP to BP and reset, which is actually what "disable_cpu_apicid=X" tries to solve. Printing the value of @phys_apicid showed that it was the value of "apicid" other that of "initial apicid" showed by /proc/cpuinfo. As described in x86 specification: "In MP systems, the local APIC ID is also used as a processor ID by the BIOS and the operating system. Some processors permit software to modify the APIC ID. However, the ability of software to modify the APIC ID is processor model specific. Because of this, operating system software should avoid writing to the local APIC ID register. The value returned by bits 31-24 of the EBX register (when the CPUID instruction is executed with a source operand value of 1 in the EAX register) is always the Initial APIC ID (determined by the platform initialization). This is true even if software has changed the value in the Local APIC ID register." From kernel commit 151e0c7de("x86, apic, kexec: Add disable_cpu_apicid kernel parameter"), we can see in generic_processor_info(), it uses a)read_apic_id() and b)@apicid to compare with @disabled_cpu_apicid. a)@apicid which is actually @phys_apicid above-mentioned is from the following calltrace(on the problematic AMD machine): generic_processor_info+0x37/0x300 acpi_register_lapic+0x30/0x90 acpi_parse_lapic+0x40/0x50 acpi_table_parse_entries_array+0x171/0x1de acpi_boot_init+0xed/0x50f The value of @apicid(from acpi MADT) is equal to the value of "apicid" showed by /proc/cpuinfo as proved by our debug printk. b)read_apic_id() gets the value from LAPIC ID register which is "apicid" as well. While the value of "initial apicid" is from cpuid instruction. One example of "apicid" and "initial apicid" of cpu0 from /proc/cpuinfo on AMD machine: apicid : 32 initial apicid : 0 Therefore, we should assign /proc/cpuifo "apicid" to "disable_cpu_apicid=X". We've never met such issue before, because we usually tested "nr_cpus=1", and mostly on Intel machines, and "apicid" and "initial apicid" have the same value in most cases on Intel machines. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com> |
||
---|---|---|
anaconda-addon | ||
.gitignore | ||
98-kexec.rules | ||
dracut-kdump-capture.service | ||
dracut-kdump-emergency.service | ||
dracut-kdump-emergency.target | ||
dracut-kdump-error-handler.service | ||
dracut-kdump-error-handler.sh | ||
dracut-kdump.sh | ||
dracut-module-setup.sh | ||
dracut-monitor_dd_progress | ||
fadump-howto.txt | ||
kdump-dep-generator.sh | ||
kdump-in-cluster-environment.txt | ||
kdump-lib-initramfs.sh | ||
kdump-lib.sh | ||
kdump.conf | ||
kdump.conf.5 | ||
kdump.service | ||
kdump.sysconfig | ||
kdump.sysconfig.i386 | ||
kdump.sysconfig.ppc64 | ||
kdump.sysconfig.ppc64le | ||
kdump.sysconfig.s390x | ||
kdump.sysconfig.x86_64 | ||
kdumpctl | ||
kdumpctl.8 | ||
kexec-kdump-howto.txt | ||
kexec-tools-2.0.3-disable-kexec-test.patch | ||
kexec-tools-2.0.14-build_mem_phdrs-check-if-p_paddr-is-invalid.patch | ||
kexec-tools-2.0.14-makedumpfile-elf_info-kcore-check-for-invalid-physic.patch | ||
kexec-tools-2.0.14-makedumpfile-initial-call-cache_init-a-bit-early.patch | ||
kexec-tools-2.0.14-makedumpfile-makedumpfile-Correct-the-calculation-of.patch | ||
kexec-tools-2.0.14-makedumpfile-makedumpfile-Discard-process_dump_load.patch | ||
kexec-tools-2.0.14-makedumpfile-mem-usage-allow-to-work-only-with-f-for.patch | ||
kexec-tools-2.0.14-makedumpfile-show_mem_usage-calculate-page-offset-af.patch | ||
kexec-tools-2.0.14-makedumpfile-x86_64-check-physical-address-in-PT_LOA.patch | ||
kexec-tools-2.0.14-x86-x86_64-Fix-format-warning-with-die.patch | ||
kexec-tools.spec | ||
live-image-kdump-howto.txt | ||
mkdumprd | ||
mkdumprd.8 | ||
README | ||
sources | ||
zanata-notes.txt |
Adding a patch to kexec-tools ============================= There is a mailing list kexec@lists.fedoraproject.org where all the dicussion related to fedora kexec-tools happen. All the patches are posted there for inclusion and committed to kexec-tools after review. So if you want your patches to be included in fedora kexec-tools package, post these to kexec@lists.fedoraproject.org. One can subscribe to list and browse through archives here. https://admin.fedoraproject.org/mailman/listinfo/kexec