* [KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host [not found] <05395ed2-3bf3-4926-8e24-c2e7ff37ed26.ref@yahoo.com> @ 2024-07-30 4:02 ` A Kundu 2024-07-31 13:04 ` A Kundu 2024-08-05 8:12 ` [KEXEC] Lacking documentation and " Juergen Gross 0 siblings, 2 replies; 16+ messages in thread From: A Kundu @ 2024-07-30 4:02 UTC (permalink / raw) To: xen-devel; +Cc: andrew.cooper3 I am experiencing issues using kexec to load Xen 4.19-rc4 and 4.20-dev on a debian host. The current documentation at https://xenbits.xenproject.org/docs/4.19-testing/misc/kexec_and_kdump.txt appears to be missing crucial details on properly using kexec with the --vmm option for loading Xen. kexec complains the --vmm option is not present. System information: $ uname -a Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) x86_64 GNU/Linux $ kexec --version # compiled from source tarball with ./configure --with-xen kexec-tools 2.0.29 Steps to reproduce: 1. Set variables: XEN_HYPERVISOR="/boot/xen.gz" XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" 2. Attempt to load Xen 4.19-rc4: # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" Could not find a free area of memory of 0x3b6001 bytes... elf_exec_build_load_relocatable: ELF exec load failed 3. Attempt to load Xen 4.20-dev: # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" Could not find a free area of memory of 0x3f8001 bytes... elf_exec_build_load_relocatable: ELF exec load failed 4. Follow the steps in the Xen manual at misc/kexec_and_kdump.txt: # Set variables XEN_IMAGE="/boot/xen-4.19-rc.gz" DOM0_IMAGE="/boot/vmlinuz-6.9.10-amd64" DOM0_INITRD="/boot/initrd.img-6.9.10-amd64" DOM0_MEMORY="6G" DOM0_CPUS="0-5" # Prepare Xen and dom0 command line arguments XEN_ARGS="no-real-mode dom0_mem=${DOM0_MEMORY}" DOM0_ARGS="max_cpus=6 dom0_max_vcpus=6 dom0_vcpus_pin" # Load Xen and dom0 kernel kexec -l --append="${XEN_ARGS} -- ${DOM0_ARGS}" --initrd=${DOM0_INITRD} \ --vmm=${XEN_IMAGE} ${DOM0_IMAGE} Result: kexec: unrecognized option '--vmm=/boot/xen-4.19-rc.gz' I have tried compiling kexec-tools 2.0.29 from source using ./configure --with-xen, as well as using debian's apt version, but both result in the same "unrecognized option '--vmm'" error. Please provide guidance on the correct steps to get kexec working for loading Xen 4.19-rc4 and 4.20-dev. Additionally, I kindly request that the documentation be updated with these details to assist other users who may encounter this issue. If you need any further information to investigate this problem, please let me know. Thank you for your attention to this matter. A Kundu ^ permalink raw reply [flat|nested] 16+ messages in thread
* kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-07-30 4:02 ` [KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host A Kundu @ 2024-07-31 13:04 ` A Kundu 2024-08-02 3:36 ` Baoquan He 2024-08-05 8:12 ` [KEXEC] Lacking documentation and " Juergen Gross 1 sibling, 1 reply; 16+ messages in thread From: A Kundu @ 2024-07-31 13:04 UTC (permalink / raw) To: kexec; +Cc: horms I am experiencing issues using kexec to load Xen 4.17(debian's apt version), Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a debian host. System information: $ uname -a Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) x86_64 GNU/Linux $ kexec --version # compiled from source tarball with ./configure --with-xen kexec-tools 2.0.29 Steps to reproduce: 1. Set variables: XEN_HYPERVISOR="/boot/xen.gz" XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" 2. Attempt to load Xen 4.19-rc4: # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" Could not find a free area of memory of 0x3b6001 bytes... elf_exec_build_load_relocatable: ELF exec load failed 3. Attempt to load Xen 4.20-dev: # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" Could not find a free area of memory of 0x3f8001 bytes... elf_exec_build_load_relocatable: ELF exec load failed 4. Attempt to load Xen 4.17 (from debian rrepositories): # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" Could not find a free area of memory of 0x3b4001 bytes... elf_exec_build_load_relocatable: ELF exec load failed If you need any further information to investigate this problem, please let me know. PS: If I used apt's pacakged version (which might be compiled --without-xen), it shows, # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" Cannot determine the file type of /boot/xen-4.17-amd64.gz # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" --type=bzImage Cannot determine the file type of /boot/xen-4.17-amd64.gz Thank you for your attention to this matter. A Kundu _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-07-31 13:04 ` A Kundu @ 2024-08-02 3:36 ` Baoquan He 2024-08-02 7:28 ` A Kundu 0 siblings, 1 reply; 16+ messages in thread From: Baoquan He @ 2024-08-02 3:36 UTC (permalink / raw) To: A Kundu; +Cc: kexec, horms On 07/31/24 at 06:34pm, A Kundu wrote: > I am experiencing issues using kexec to load Xen 4.17(debian's apt version), > Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a > debian host. You should CC this to XEN dev list so that XEN dev knows this and may provide help. Not everyone is interested in and knows XEN. > > System information: > $ uname -a > Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) > x86_64 GNU/Linux > > $ kexec --version # compiled from source tarball with ./configure --with-xen > kexec-tools 2.0.29 > > Steps to reproduce: > > 1. Set variables: > > XEN_HYPERVISOR="/boot/xen.gz" > XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" > > 2. Attempt to load Xen 4.19-rc4: > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > Could not find a free area of memory of 0x3b6001 bytes... > elf_exec_build_load_relocatable: ELF exec load failed > > 3. Attempt to load Xen 4.20-dev: > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > Could not find a free area of memory of 0x3f8001 bytes... > elf_exec_build_load_relocatable: ELF exec load failed > > 4. Attempt to load Xen 4.17 (from debian rrepositories): > # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" > Could not find a free area of memory of 0x3b4001 bytes... > elf_exec_build_load_relocatable: ELF exec load failed > > If you need any further information to investigate this problem, > please let me know. > > PS: If I used apt's pacakged version (which might be compiled > --without-xen), > it shows, > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > Cannot determine the file type of /boot/xen-4.17-amd64.gz > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" --type=bzImage > Cannot determine the file type of /boot/xen-4.17-amd64.gz > > > Thank you for your attention to this matter. > > A Kundu > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-02 3:36 ` Baoquan He @ 2024-08-02 7:28 ` A Kundu 0 siblings, 0 replies; 16+ messages in thread From: A Kundu @ 2024-08-02 7:28 UTC (permalink / raw) To: Baoquan He; +Cc: kexec, horms, xen-devel Done. On 8/2/24 09:06, Baoquan He wrote: > On 07/31/24 at 06:34pm, A Kundu wrote: >> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >> debian host. > You should CC this to XEN dev list so that XEN dev knows this and may > provide help. Not everyone is interested in and knows XEN. > >> System information: >> $ uname -a >> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >> x86_64 GNU/Linux >> >> $ kexec --version # compiled from source tarball with ./configure --with-xen >> kexec-tools 2.0.29 >> >> Steps to reproduce: >> >> 1. Set variables: >> >> XEN_HYPERVISOR="/boot/xen.gz" >> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >> >> 2. Attempt to load Xen 4.19-rc4: >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3b6001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> 3. Attempt to load Xen 4.20-dev: >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3f8001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> 4. Attempt to load Xen 4.17 (from debian rrepositories): >> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3b4001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> If you need any further information to investigate this problem, >> please let me know. >> >> PS: If I used apt's pacakged version (which might be compiled >> --without-xen), >> it shows, >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Cannot determine the file type of /boot/xen-4.17-amd64.gz >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" --type=bzImage >> Cannot determine the file type of /boot/xen-4.17-amd64.gz >> >> >> Thank you for your attention to this matter. >> >> A Kundu >> >> _______________________________________________ >> kexec mailing list >> kexec@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/kexec >> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-02 7:28 ` A Kundu 0 siblings, 0 replies; 16+ messages in thread From: A Kundu @ 2024-08-02 7:28 UTC (permalink / raw) To: Baoquan He; +Cc: kexec, horms, xen-devel Done. On 8/2/24 09:06, Baoquan He wrote: > On 07/31/24 at 06:34pm, A Kundu wrote: >> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >> debian host. > You should CC this to XEN dev list so that XEN dev knows this and may > provide help. Not everyone is interested in and knows XEN. > >> System information: >> $ uname -a >> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >> x86_64 GNU/Linux >> >> $ kexec --version # compiled from source tarball with ./configure --with-xen >> kexec-tools 2.0.29 >> >> Steps to reproduce: >> >> 1. Set variables: >> >> XEN_HYPERVISOR="/boot/xen.gz" >> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >> >> 2. Attempt to load Xen 4.19-rc4: >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3b6001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> 3. Attempt to load Xen 4.20-dev: >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3f8001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> 4. Attempt to load Xen 4.17 (from debian rrepositories): >> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >> Could not find a free area of memory of 0x3b4001 bytes... >> elf_exec_build_load_relocatable: ELF exec load failed >> >> If you need any further information to investigate this problem, >> please let me know. >> >> PS: If I used apt's pacakged version (which might be compiled >> --without-xen), >> it shows, >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> Cannot determine the file type of /boot/xen-4.17-amd64.gz >> >> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" --type=bzImage >> Cannot determine the file type of /boot/xen-4.17-amd64.gz >> >> >> Thank you for your attention to this matter. >> >> A Kundu >> >> _______________________________________________ >> kexec mailing list >> kexec@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/kexec >> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-02 7:28 ` A Kundu @ 2024-08-02 7:55 ` Jan Beulich -1 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-02 7:55 UTC (permalink / raw) To: A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He On 02.08.2024 09:28, A Kundu wrote: > On 8/2/24 09:06, Baoquan He wrote: >> On 07/31/24 at 06:34pm, A Kundu wrote: >>> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >>> debian host. >> You should CC this to XEN dev list so that XEN dev knows this and may >> provide help. Not everyone is interested in and knows XEN. >> >>> System information: >>> $ uname -a >>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >>> x86_64 GNU/Linux >>> >>> $ kexec --version # compiled from source tarball with ./configure --with-xen >>> kexec-tools 2.0.29 >>> >>> Steps to reproduce: >>> >>> 1. Set variables: >>> >>> XEN_HYPERVISOR="/boot/xen.gz" >>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>> >>> 2. Attempt to load Xen 4.19-rc4: >>> >>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3b6001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>> 3. Attempt to load Xen 4.20-dev: >>> >>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3f8001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3b4001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed And with all of them saying effectively the same, did you verify you actually have a sufficiently large area reserved? The obvious place for you to look at is Xen's boot log (obtained via serial console or "xl dmesg" immediately after booting the system). If you find everything as expected there, ... >>> If you need any further information to investigate this problem, >>> please let me know. ... please provide that boot log. Jan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-02 7:55 ` Jan Beulich 0 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-02 7:55 UTC (permalink / raw) To: A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He On 02.08.2024 09:28, A Kundu wrote: > On 8/2/24 09:06, Baoquan He wrote: >> On 07/31/24 at 06:34pm, A Kundu wrote: >>> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >>> debian host. >> You should CC this to XEN dev list so that XEN dev knows this and may >> provide help. Not everyone is interested in and knows XEN. >> >>> System information: >>> $ uname -a >>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >>> x86_64 GNU/Linux >>> >>> $ kexec --version # compiled from source tarball with ./configure --with-xen >>> kexec-tools 2.0.29 >>> >>> Steps to reproduce: >>> >>> 1. Set variables: >>> >>> XEN_HYPERVISOR="/boot/xen.gz" >>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>> >>> 2. Attempt to load Xen 4.19-rc4: >>> >>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3b6001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>> 3. Attempt to load Xen 4.20-dev: >>> >>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3f8001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>> Could not find a free area of memory of 0x3b4001 bytes... >>> elf_exec_build_load_relocatable: ELF exec load failed And with all of them saying effectively the same, did you verify you actually have a sufficiently large area reserved? The obvious place for you to look at is Xen's boot log (obtained via serial console or "xl dmesg" immediately after booting the system). If you find everything as expected there, ... >>> If you need any further information to investigate this problem, >>> please let me know. ... please provide that boot log. Jan ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-02 7:55 ` Jan Beulich @ 2024-08-04 13:17 ` A Kundu -1 siblings, 0 replies; 16+ messages in thread From: A Kundu @ 2024-08-04 13:17 UTC (permalink / raw) To: Jan Beulich; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 8/2/24 13:25, Jan Beulich wrote: > On 02.08.2024 09:28, A Kundu wrote: >> On 8/2/24 09:06, Baoquan He wrote: >>> On 07/31/24 at 06:34pm, A Kundu wrote: >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >>>> debian host. >>> You should CC this to XEN dev list so that XEN dev knows this and may >>> provide help. Not everyone is interested in and knows XEN. >>> >>>> System information: >>>> $ uname -a >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >>>> x86_64 GNU/Linux >>>> >>>> $ kexec --version # compiled from source tarball with ./configure --with-xen >>>> kexec-tools 2.0.29 >>>> >>>> Steps to reproduce: >>>> >>>> 1. Set variables: >>>> >>>> XEN_HYPERVISOR="/boot/xen.gz" >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>>> >>>> 2. Attempt to load Xen 4.19-rc4: >>>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3b6001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed >>>> >>>> 3. Attempt to load Xen 4.20-dev: >>>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3f8001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed >>>> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3b4001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed > > And with all of them saying effectively the same, did you verify you > actually have a sufficiently large area reserved? The obvious > place for you to look at is Xen's boot log (obtained via serial > console or "xl dmesg" immediately after booting the system). If you > find everything as expected there, ... > >>>> If you need any further information to investigate this problem, >>>> please let me know. > > ... please provide that boot log. Dear Jan, Thank you for your response and suggestions. As mentioned in my original message, I have already attempted to load Xen using kexec with various versions (4.17, 4.19-rc4, and 4.20-dev), all of which resulted in the same error: Could not find a free area of memory of 0x3b6001 bytes... elf_exec_build_load_relocatable: ELF exec load failed I have also followed up on your suggestion to check the Xen boot log using "xl dmesg", but unfortunately, I received the following error: xencall: error: Could not obtain handle on privileged command interface: No such file or directory libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No such file or directory cannot init xl context This indicates that Xen did not boot successfully, so there are no logs available. > > And with all of them saying effectively the same, did you verify you > actually have a sufficiently large area reserved? The obvious > place for you to look at is Xen's boot log (obtained via serial > console or "xl dmesg" immediately after booting the system). If you > find everything as expected there, ... > In an attempt to resolve the memory allocation issue, I have tried the following: Added a crashkernel=<size>@<offset> parameter to the host kernel command line to reserve a dedicated memory region for kexec, and attempted to load Xen into that area. Experimented with the mem=<size> parameter to limit the amount of memory used by the host kernel, hoping to leave more contiguous space available for loading Xen. Unfortunately, neither of these approaches resolved the issue, and I still encounter the same memory allocation error when attempting to load Xen with kexec. I have also reviewed the available documentation for kexec and Xen, but much of it appears to be outdated, referencing archaic options like --vmm which no longer exist in the current version of kexec-tools. > Jan At this point, I'm unsure of how to proceed. I suspect the issue may be related to changes in the kexec codebase and its interaction with Xen, as kexec docs for Xen has not been actively maintained since 2017. git log -1 --format="%ad" -- docs/misc/kexec_and_kdump.txt Fri Jun 9 14:11:37 2017 +0200 If it's not too much to ask, could you please check if you can successfully launch the Xen kernel using kexec with kexec-tools version > 2.x.x and a Linux kernel version >= 6.6? I have never been able to boot the Xen kernel with anything (syslinux, zfsbootmenu)other than GRUB and mboot.c32, as used by Citrix or XCP-ng. In fact, I have never come across a Xen distribution that doesn't rely on GRUB for xen, which makes me question whether kexec'ing the Xen kernel is even possible at this point. For reference, I'm providing a log of my attempts to boot Xen using ZFSBootMenu (a barebones linux kernel trying to boot via kexec; other details irrelevant): tee: /zfsbootmenu/environments/zroot/ROOT/debian/mnt/var/zbm.log: Read-only file system === Attempting to Launch Xen === Selected Kernel : /boot/vmlinuz-6.9.12-amd64 Selected initramfs : /boot/initrd.img-6.9.12-amd64 Selected BE : zroot/ROOT/debian Selected Mountpoint : /zfsbootmenu/environments/zroot/ROOT/debian/mnt ZFSBootMenu kernel commandline: quiet loglevel=0 zfs get org.zfsbootmenu:commandline zroot/ROOT/debian NAME PROPERTY VALUE SOURCE zroot/ROOT/debian org.zfsbootmenu:commandline quiet crashkernel=0M memmap=64M$0x100000000 local (^^^ This is the linux/dom0 commandline, executed by kexec) === Memory reported by head /proc/meminfo === MemTotal: 8044084 kB MemFree: 7822332 kB MemAvailable: 7687320 kB Buffers: 0 kB Cached: 49136 kB SwapCached: 0 kB Active: 45868 kB Inactive: 0 kB Active(anon): 45868 kB Inactive(anon): 0 kB === End of Memory Report === Xen kernel found. Attempting kexec... Xen Kernel Path : /zfsbootmenu/environments/zroot/ROOT/debian/mnt/boot/xen.gz Try gzip decompression. Could not find a free area of memory of 0x3ba001 bytes... elf_exec_build_load_relocatable: ELF exec load failed Executing kexec... Nothing has been loaded! After booting into linux what happens, I have already shared. If you have any further insights or suggestions on how to overcome this memory allocation issue or successfully boot Xen using kexec on a modern system, I would greatly appreciate your guidance. Thank you for your time and assistance. Best regards, A Kundu _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-04 13:17 ` A Kundu 0 siblings, 0 replies; 16+ messages in thread From: A Kundu @ 2024-08-04 13:17 UTC (permalink / raw) To: Jan Beulich; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 8/2/24 13:25, Jan Beulich wrote: > On 02.08.2024 09:28, A Kundu wrote: >> On 8/2/24 09:06, Baoquan He wrote: >>> On 07/31/24 at 06:34pm, A Kundu wrote: >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt version), >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from source) on a >>>> debian host. >>> You should CC this to XEN dev list so that XEN dev knows this and may >>> provide help. Not everyone is interested in and knows XEN. >>> >>>> System information: >>>> $ uname -a >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) >>>> x86_64 GNU/Linux >>>> >>>> $ kexec --version # compiled from source tarball with ./configure --with-xen >>>> kexec-tools 2.0.29 >>>> >>>> Steps to reproduce: >>>> >>>> 1. Set variables: >>>> >>>> XEN_HYPERVISOR="/boot/xen.gz" >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>>> >>>> 2. Attempt to load Xen 4.19-rc4: >>>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3b6001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed >>>> >>>> 3. Attempt to load Xen 4.20-dev: >>>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3f8001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed >>>> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>>> Could not find a free area of memory of 0x3b4001 bytes... >>>> elf_exec_build_load_relocatable: ELF exec load failed > > And with all of them saying effectively the same, did you verify you > actually have a sufficiently large area reserved? The obvious > place for you to look at is Xen's boot log (obtained via serial > console or "xl dmesg" immediately after booting the system). If you > find everything as expected there, ... > >>>> If you need any further information to investigate this problem, >>>> please let me know. > > ... please provide that boot log. Dear Jan, Thank you for your response and suggestions. As mentioned in my original message, I have already attempted to load Xen using kexec with various versions (4.17, 4.19-rc4, and 4.20-dev), all of which resulted in the same error: Could not find a free area of memory of 0x3b6001 bytes... elf_exec_build_load_relocatable: ELF exec load failed I have also followed up on your suggestion to check the Xen boot log using "xl dmesg", but unfortunately, I received the following error: xencall: error: Could not obtain handle on privileged command interface: No such file or directory libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No such file or directory cannot init xl context This indicates that Xen did not boot successfully, so there are no logs available. > > And with all of them saying effectively the same, did you verify you > actually have a sufficiently large area reserved? The obvious > place for you to look at is Xen's boot log (obtained via serial > console or "xl dmesg" immediately after booting the system). If you > find everything as expected there, ... > In an attempt to resolve the memory allocation issue, I have tried the following: Added a crashkernel=<size>@<offset> parameter to the host kernel command line to reserve a dedicated memory region for kexec, and attempted to load Xen into that area. Experimented with the mem=<size> parameter to limit the amount of memory used by the host kernel, hoping to leave more contiguous space available for loading Xen. Unfortunately, neither of these approaches resolved the issue, and I still encounter the same memory allocation error when attempting to load Xen with kexec. I have also reviewed the available documentation for kexec and Xen, but much of it appears to be outdated, referencing archaic options like --vmm which no longer exist in the current version of kexec-tools. > Jan At this point, I'm unsure of how to proceed. I suspect the issue may be related to changes in the kexec codebase and its interaction with Xen, as kexec docs for Xen has not been actively maintained since 2017. git log -1 --format="%ad" -- docs/misc/kexec_and_kdump.txt Fri Jun 9 14:11:37 2017 +0200 If it's not too much to ask, could you please check if you can successfully launch the Xen kernel using kexec with kexec-tools version > 2.x.x and a Linux kernel version >= 6.6? I have never been able to boot the Xen kernel with anything (syslinux, zfsbootmenu)other than GRUB and mboot.c32, as used by Citrix or XCP-ng. In fact, I have never come across a Xen distribution that doesn't rely on GRUB for xen, which makes me question whether kexec'ing the Xen kernel is even possible at this point. For reference, I'm providing a log of my attempts to boot Xen using ZFSBootMenu (a barebones linux kernel trying to boot via kexec; other details irrelevant): tee: /zfsbootmenu/environments/zroot/ROOT/debian/mnt/var/zbm.log: Read-only file system === Attempting to Launch Xen === Selected Kernel : /boot/vmlinuz-6.9.12-amd64 Selected initramfs : /boot/initrd.img-6.9.12-amd64 Selected BE : zroot/ROOT/debian Selected Mountpoint : /zfsbootmenu/environments/zroot/ROOT/debian/mnt ZFSBootMenu kernel commandline: quiet loglevel=0 zfs get org.zfsbootmenu:commandline zroot/ROOT/debian NAME PROPERTY VALUE SOURCE zroot/ROOT/debian org.zfsbootmenu:commandline quiet crashkernel=0M memmap=64M$0x100000000 local (^^^ This is the linux/dom0 commandline, executed by kexec) === Memory reported by head /proc/meminfo === MemTotal: 8044084 kB MemFree: 7822332 kB MemAvailable: 7687320 kB Buffers: 0 kB Cached: 49136 kB SwapCached: 0 kB Active: 45868 kB Inactive: 0 kB Active(anon): 45868 kB Inactive(anon): 0 kB === End of Memory Report === Xen kernel found. Attempting kexec... Xen Kernel Path : /zfsbootmenu/environments/zroot/ROOT/debian/mnt/boot/xen.gz Try gzip decompression. Could not find a free area of memory of 0x3ba001 bytes... elf_exec_build_load_relocatable: ELF exec load failed Executing kexec... Nothing has been loaded! After booting into linux what happens, I have already shared. If you have any further insights or suggestions on how to overcome this memory allocation issue or successfully boot Xen using kexec on a modern system, I would greatly appreciate your guidance. Thank you for your time and assistance. Best regards, A Kundu ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-04 13:17 ` A Kundu @ 2024-08-05 6:01 ` Jan Beulich -1 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-05 6:01 UTC (permalink / raw) To: A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 04.08.2024 15:17, A Kundu wrote: > On 8/2/24 13:25, Jan Beulich wrote: > > On 02.08.2024 09:28, A Kundu wrote: > >> On 8/2/24 09:06, Baoquan He wrote: > >>> On 07/31/24 at 06:34pm, A Kundu wrote: > >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt > version), > >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from > source) on a > >>>> debian host. > >>> You should CC this to XEN dev list so that XEN dev knows this and may > >>> provide help. Not everyone is interested in and knows XEN. > >>> > >>>> System information: > >>>> $ uname -a > >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 > (2024-07-19) > >>>> x86_64 GNU/Linux > >>>> > >>>> $ kexec --version # compiled from source tarball with ./configure > --with-xen > >>>> kexec-tools 2.0.29 > >>>> > >>>> Steps to reproduce: > >>>> > >>>> 1. Set variables: > >>>> > >>>> XEN_HYPERVISOR="/boot/xen.gz" > >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" > >>>> > >>>> 2. Attempt to load Xen 4.19-rc4: > >>>> > >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3b6001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > >>>> > >>>> 3. Attempt to load Xen 4.20-dev: > >>>> > >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3f8001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > >>>> > >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): > >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3b4001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > > > > And with all of them saying effectively the same, did you verify you > > actually have a sufficiently large area reserved? The obvious > > place for you to look at is Xen's boot log (obtained via serial > > console or "xl dmesg" immediately after booting the system). If you > > find everything as expected there, ... > > > >>>> If you need any further information to investigate this problem, > >>>> please let me know. > > > > ... please provide that boot log. > > I have also followed up on your suggestion to check the Xen boot log > using "xl dmesg", but unfortunately, I received the following error: > > xencall: error: Could not obtain handle on privileged command interface: > No such file or directory > libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No > such file or directory > cannot init xl context > > This indicates that Xen did not boot successfully, so there are no logs > available. The fact that you have Dom0 up makes clear that Xen booted okay(ish). The fact that you get "No such file or directory" from xencall suggests you either didn't load the xen-privcmd driver (normally arrangements are made by distros for this to happen automatically), or you didn't even build it. > > And with all of them saying effectively the same, did you verify you > > actually have a sufficiently large area reserved? The obvious > > place for you to look at is Xen's boot log (obtained via serial > > console or "xl dmesg" immediately after booting the system). If you > > find everything as expected there, ... > > > > In an attempt to resolve the memory allocation issue, I have tried the > following: > > Added a crashkernel=<size>@<offset> parameter to the host kernel command > line to reserve a dedicated memory region for kexec, and attempted to > load Xen into that area. That was a remote guess of mine. This command line option is meaningless when running under Xen. The reservation needs to be done in Xen. Overall for the moment I'm inclined to say that xen-devel@ isn't the right forum here. xen-users@ might be quite a bit more appropriate until you actually run into issues with Xen itself, not with its (correct) use. Jan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-05 6:01 ` Jan Beulich 0 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-05 6:01 UTC (permalink / raw) To: A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 04.08.2024 15:17, A Kundu wrote: > On 8/2/24 13:25, Jan Beulich wrote: > > On 02.08.2024 09:28, A Kundu wrote: > >> On 8/2/24 09:06, Baoquan He wrote: > >>> On 07/31/24 at 06:34pm, A Kundu wrote: > >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt > version), > >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from > source) on a > >>>> debian host. > >>> You should CC this to XEN dev list so that XEN dev knows this and may > >>> provide help. Not everyone is interested in and knows XEN. > >>> > >>>> System information: > >>>> $ uname -a > >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 > (2024-07-19) > >>>> x86_64 GNU/Linux > >>>> > >>>> $ kexec --version # compiled from source tarball with ./configure > --with-xen > >>>> kexec-tools 2.0.29 > >>>> > >>>> Steps to reproduce: > >>>> > >>>> 1. Set variables: > >>>> > >>>> XEN_HYPERVISOR="/boot/xen.gz" > >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" > >>>> > >>>> 2. Attempt to load Xen 4.19-rc4: > >>>> > >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3b6001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > >>>> > >>>> 3. Attempt to load Xen 4.20-dev: > >>>> > >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3f8001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > >>>> > >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): > >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" > >>>> Could not find a free area of memory of 0x3b4001 bytes... > >>>> elf_exec_build_load_relocatable: ELF exec load failed > > > > And with all of them saying effectively the same, did you verify you > > actually have a sufficiently large area reserved? The obvious > > place for you to look at is Xen's boot log (obtained via serial > > console or "xl dmesg" immediately after booting the system). If you > > find everything as expected there, ... > > > >>>> If you need any further information to investigate this problem, > >>>> please let me know. > > > > ... please provide that boot log. > > I have also followed up on your suggestion to check the Xen boot log > using "xl dmesg", but unfortunately, I received the following error: > > xencall: error: Could not obtain handle on privileged command interface: > No such file or directory > libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No > such file or directory > cannot init xl context > > This indicates that Xen did not boot successfully, so there are no logs > available. The fact that you have Dom0 up makes clear that Xen booted okay(ish). The fact that you get "No such file or directory" from xencall suggests you either didn't load the xen-privcmd driver (normally arrangements are made by distros for this to happen automatically), or you didn't even build it. > > And with all of them saying effectively the same, did you verify you > > actually have a sufficiently large area reserved? The obvious > > place for you to look at is Xen's boot log (obtained via serial > > console or "xl dmesg" immediately after booting the system). If you > > find everything as expected there, ... > > > > In an attempt to resolve the memory allocation issue, I have tried the > following: > > Added a crashkernel=<size>@<offset> parameter to the host kernel command > line to reserve a dedicated memory region for kexec, and attempted to > load Xen into that area. That was a remote guess of mine. This command line option is meaningless when running under Xen. The reservation needs to be done in Xen. Overall for the moment I'm inclined to say that xen-devel@ isn't the right forum here. xen-users@ might be quite a bit more appropriate until you actually run into issues with Xen itself, not with its (correct) use. Jan ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-05 6:01 ` Jan Beulich @ 2024-08-05 7:52 ` Juergen Gross -1 siblings, 0 replies; 16+ messages in thread From: Juergen Gross @ 2024-08-05 7:52 UTC (permalink / raw) To: Jan Beulich, A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 [-- Attachment #1.1.1.1: Type: text/plain, Size: 4516 bytes --] On 05.08.24 08:01, Jan Beulich wrote: > On 04.08.2024 15:17, A Kundu wrote: >> On 8/2/24 13:25, Jan Beulich wrote: >> > On 02.08.2024 09:28, A Kundu wrote: >> >> On 8/2/24 09:06, Baoquan He wrote: >> >>> On 07/31/24 at 06:34pm, A Kundu wrote: >> >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt >> version), >> >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from >> source) on a >> >>>> debian host. >> >>> You should CC this to XEN dev list so that XEN dev knows this and may >> >>> provide help. Not everyone is interested in and knows XEN. >> >>> >> >>>> System information: >> >>>> $ uname -a >> >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 >> (2024-07-19) >> >>>> x86_64 GNU/Linux >> >>>> >> >>>> $ kexec --version # compiled from source tarball with ./configure >> --with-xen >> >>>> kexec-tools 2.0.29 >> >>>> >> >>>> Steps to reproduce: >> >>>> >> >>>> 1. Set variables: >> >>>> >> >>>> XEN_HYPERVISOR="/boot/xen.gz" >> >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >> >>>> >> >>>> 2. Attempt to load Xen 4.19-rc4: >> >>>> >> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3b6001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> >>>> >> >>>> 3. Attempt to load Xen 4.20-dev: >> >>>> >> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3f8001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> >>>> >> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >> >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3b4001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> > >> > And with all of them saying effectively the same, did you verify you >> > actually have a sufficiently large area reserved? The obvious >> > place for you to look at is Xen's boot log (obtained via serial >> > console or "xl dmesg" immediately after booting the system). If you >> > find everything as expected there, ... >> > >> >>>> If you need any further information to investigate this problem, >> >>>> please let me know. >> > >> > ... please provide that boot log. >> >> I have also followed up on your suggestion to check the Xen boot log >> using "xl dmesg", but unfortunately, I received the following error: >> >> xencall: error: Could not obtain handle on privileged command interface: >> No such file or directory >> libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No >> such file or directory >> cannot init xl context >> >> This indicates that Xen did not boot successfully, so there are no logs >> available. > > The fact that you have Dom0 up makes clear that Xen booted okay(ish). The > fact that you get "No such file or directory" from xencall suggests you > either didn't load the xen-privcmd driver (normally arrangements are made > by distros for this to happen automatically), or you didn't even build it. The messages seen don't indicate that Xen booted okay(ish). I get the same messages when having booted the Linux kernel on bare metal without Xen. > >> > And with all of them saying effectively the same, did you verify you >> > actually have a sufficiently large area reserved? The obvious >> > place for you to look at is Xen's boot log (obtained via serial >> > console or "xl dmesg" immediately after booting the system). If you >> > find everything as expected there, ... >> > >> >> In an attempt to resolve the memory allocation issue, I have tried the >> following: >> >> Added a crashkernel=<size>@<offset> parameter to the host kernel command >> line to reserve a dedicated memory region for kexec, and attempted to >> load Xen into that area. > > That was a remote guess of mine. This command line option is meaningless > when running under Xen. The reservation needs to be done in Xen. Just one thing to add here: what do you want to accomplish by kexec-ing into Xen? You need to specify a dom0 kernel and probably the dom0's initrd, too. Or do you have configured your dom0 to work without an initrd? Even in this case you'd need to pass on the dom0 to Xen via the kexec command. Juergen [-- Attachment #1.1.1.2: OpenPGP public key --] [-- Type: application/pgp-keys, Size: 3743 bytes --] [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 495 bytes --] [-- Attachment #2: Type: text/plain, Size: 143 bytes --] _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-05 7:52 ` Juergen Gross 0 siblings, 0 replies; 16+ messages in thread From: Juergen Gross @ 2024-08-05 7:52 UTC (permalink / raw) To: Jan Beulich, A Kundu; +Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 [-- Attachment #1.1.1: Type: text/plain, Size: 4516 bytes --] On 05.08.24 08:01, Jan Beulich wrote: > On 04.08.2024 15:17, A Kundu wrote: >> On 8/2/24 13:25, Jan Beulich wrote: >> > On 02.08.2024 09:28, A Kundu wrote: >> >> On 8/2/24 09:06, Baoquan He wrote: >> >>> On 07/31/24 at 06:34pm, A Kundu wrote: >> >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt >> version), >> >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from >> source) on a >> >>>> debian host. >> >>> You should CC this to XEN dev list so that XEN dev knows this and may >> >>> provide help. Not everyone is interested in and knows XEN. >> >>> >> >>>> System information: >> >>>> $ uname -a >> >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 >> (2024-07-19) >> >>>> x86_64 GNU/Linux >> >>>> >> >>>> $ kexec --version # compiled from source tarball with ./configure >> --with-xen >> >>>> kexec-tools 2.0.29 >> >>>> >> >>>> Steps to reproduce: >> >>>> >> >>>> 1. Set variables: >> >>>> >> >>>> XEN_HYPERVISOR="/boot/xen.gz" >> >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >> >>>> >> >>>> 2. Attempt to load Xen 4.19-rc4: >> >>>> >> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3b6001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> >>>> >> >>>> 3. Attempt to load Xen 4.20-dev: >> >>>> >> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3f8001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> >>>> >> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >> >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >> >>>> Could not find a free area of memory of 0x3b4001 bytes... >> >>>> elf_exec_build_load_relocatable: ELF exec load failed >> > >> > And with all of them saying effectively the same, did you verify you >> > actually have a sufficiently large area reserved? The obvious >> > place for you to look at is Xen's boot log (obtained via serial >> > console or "xl dmesg" immediately after booting the system). If you >> > find everything as expected there, ... >> > >> >>>> If you need any further information to investigate this problem, >> >>>> please let me know. >> > >> > ... please provide that boot log. >> >> I have also followed up on your suggestion to check the Xen boot log >> using "xl dmesg", but unfortunately, I received the following error: >> >> xencall: error: Could not obtain handle on privileged command interface: >> No such file or directory >> libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No >> such file or directory >> cannot init xl context >> >> This indicates that Xen did not boot successfully, so there are no logs >> available. > > The fact that you have Dom0 up makes clear that Xen booted okay(ish). The > fact that you get "No such file or directory" from xencall suggests you > either didn't load the xen-privcmd driver (normally arrangements are made > by distros for this to happen automatically), or you didn't even build it. The messages seen don't indicate that Xen booted okay(ish). I get the same messages when having booted the Linux kernel on bare metal without Xen. > >> > And with all of them saying effectively the same, did you verify you >> > actually have a sufficiently large area reserved? The obvious >> > place for you to look at is Xen's boot log (obtained via serial >> > console or "xl dmesg" immediately after booting the system). If you >> > find everything as expected there, ... >> > >> >> In an attempt to resolve the memory allocation issue, I have tried the >> following: >> >> Added a crashkernel=<size>@<offset> parameter to the host kernel command >> line to reserve a dedicated memory region for kexec, and attempted to >> load Xen into that area. > > That was a remote guess of mine. This command line option is meaningless > when running under Xen. The reservation needs to be done in Xen. Just one thing to add here: what do you want to accomplish by kexec-ing into Xen? You need to specify a dom0 kernel and probably the dom0's initrd, too. Or do you have configured your dom0 to work without an initrd? Even in this case you'd need to pass on the dom0 to Xen via the kexec command. Juergen [-- Attachment #1.1.2: OpenPGP public key --] [-- Type: application/pgp-keys, Size: 3743 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 495 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-08-05 7:52 ` Juergen Gross @ 2024-08-05 8:13 ` Jan Beulich -1 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-05 8:13 UTC (permalink / raw) To: Juergen Gross, A Kundu Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 05.08.2024 09:52, Juergen Gross wrote: > On 05.08.24 08:01, Jan Beulich wrote: >> On 04.08.2024 15:17, A Kundu wrote: >>> On 8/2/24 13:25, Jan Beulich wrote: >>> > On 02.08.2024 09:28, A Kundu wrote: >>> >> On 8/2/24 09:06, Baoquan He wrote: >>> >>> On 07/31/24 at 06:34pm, A Kundu wrote: >>> >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt >>> version), >>> >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from >>> source) on a >>> >>>> debian host. >>> >>> You should CC this to XEN dev list so that XEN dev knows this and may >>> >>> provide help. Not everyone is interested in and knows XEN. >>> >>> >>> >>>> System information: >>> >>>> $ uname -a >>> >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 >>> (2024-07-19) >>> >>>> x86_64 GNU/Linux >>> >>>> >>> >>>> $ kexec --version # compiled from source tarball with ./configure >>> --with-xen >>> >>>> kexec-tools 2.0.29 >>> >>>> >>> >>>> Steps to reproduce: >>> >>>> >>> >>>> 1. Set variables: >>> >>>> >>> >>>> XEN_HYPERVISOR="/boot/xen.gz" >>> >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>> >>>> >>> >>>> 2. Attempt to load Xen 4.19-rc4: >>> >>>> >>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3b6001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>>> >>> >>>> 3. Attempt to load Xen 4.20-dev: >>> >>>> >>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3f8001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>>> >>> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>> >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3b4001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> > >>> > And with all of them saying effectively the same, did you verify you >>> > actually have a sufficiently large area reserved? The obvious >>> > place for you to look at is Xen's boot log (obtained via serial >>> > console or "xl dmesg" immediately after booting the system). If you >>> > find everything as expected there, ... >>> > >>> >>>> If you need any further information to investigate this problem, >>> >>>> please let me know. >>> > >>> > ... please provide that boot log. >>> >>> I have also followed up on your suggestion to check the Xen boot log >>> using "xl dmesg", but unfortunately, I received the following error: >>> >>> xencall: error: Could not obtain handle on privileged command interface: >>> No such file or directory >>> libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No >>> such file or directory >>> cannot init xl context >>> >>> This indicates that Xen did not boot successfully, so there are no logs >>> available. >> >> The fact that you have Dom0 up makes clear that Xen booted okay(ish). The >> fact that you get "No such file or directory" from xencall suggests you >> either didn't load the xen-privcmd driver (normally arrangements are made >> by distros for this to happen automatically), or you didn't even build it. > > The messages seen don't indicate that Xen booted okay(ish). I get the same > messages when having booted the Linux kernel on bare metal without Xen. Hmm, I didn't even think of this as a possible case, considering the question was forwarded to xen-devel (from a kexec list). I'm afraid Xen simply plays no role when setting up kexec (to whatever target) from a bare metal env. Jan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host @ 2024-08-05 8:13 ` Jan Beulich 0 siblings, 0 replies; 16+ messages in thread From: Jan Beulich @ 2024-08-05 8:13 UTC (permalink / raw) To: Juergen Gross, A Kundu Cc: kexec, horms, xen-devel, Baoquan He, andrew.cooper3 On 05.08.2024 09:52, Juergen Gross wrote: > On 05.08.24 08:01, Jan Beulich wrote: >> On 04.08.2024 15:17, A Kundu wrote: >>> On 8/2/24 13:25, Jan Beulich wrote: >>> > On 02.08.2024 09:28, A Kundu wrote: >>> >> On 8/2/24 09:06, Baoquan He wrote: >>> >>> On 07/31/24 at 06:34pm, A Kundu wrote: >>> >>>> I am experiencing issues using kexec to load Xen 4.17(debian's apt >>> version), >>> >>>> Xen 4.19-rc4 (compiled from source) and 4.20-dev (compiled from >>> source) on a >>> >>>> debian host. >>> >>> You should CC this to XEN dev list so that XEN dev knows this and may >>> >>> provide help. Not everyone is interested in and knows XEN. >>> >>> >>> >>>> System information: >>> >>>> $ uname -a >>> >>>> Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 >>> (2024-07-19) >>> >>>> x86_64 GNU/Linux >>> >>>> >>> >>>> $ kexec --version # compiled from source tarball with ./configure >>> --with-xen >>> >>>> kexec-tools 2.0.29 >>> >>>> >>> >>>> Steps to reproduce: >>> >>>> >>> >>>> 1. Set variables: >>> >>>> >>> >>>> XEN_HYPERVISOR="/boot/xen.gz" >>> >>>> XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" >>> >>>> >>> >>>> 2. Attempt to load Xen 4.19-rc4: >>> >>>> >>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3b6001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>>> >>> >>>> 3. Attempt to load Xen 4.20-dev: >>> >>>> >>> >>>> # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3f8001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> >>>> >>> >>>> 4. Attempt to load Xen 4.17 (from debian rrepositories): >>> >>>> # kexec -l /boot/xen-4.17-amd64.gz --command-line="$XEN_CMD" >>> >>>> Could not find a free area of memory of 0x3b4001 bytes... >>> >>>> elf_exec_build_load_relocatable: ELF exec load failed >>> > >>> > And with all of them saying effectively the same, did you verify you >>> > actually have a sufficiently large area reserved? The obvious >>> > place for you to look at is Xen's boot log (obtained via serial >>> > console or "xl dmesg" immediately after booting the system). If you >>> > find everything as expected there, ... >>> > >>> >>>> If you need any further information to investigate this problem, >>> >>>> please let me know. >>> > >>> > ... please provide that boot log. >>> >>> I have also followed up on your suggestion to check the Xen boot log >>> using "xl dmesg", but unfortunately, I received the following error: >>> >>> xencall: error: Could not obtain handle on privileged command interface: >>> No such file or directory >>> libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No >>> such file or directory >>> cannot init xl context >>> >>> This indicates that Xen did not boot successfully, so there are no logs >>> available. >> >> The fact that you have Dom0 up makes clear that Xen booted okay(ish). The >> fact that you get "No such file or directory" from xencall suggests you >> either didn't load the xen-privcmd driver (normally arrangements are made >> by distros for this to happen automatically), or you didn't even build it. > > The messages seen don't indicate that Xen booted okay(ish). I get the same > messages when having booted the Linux kernel on bare metal without Xen. Hmm, I didn't even think of this as a possible case, considering the question was forwarded to xen-devel (from a kexec list). I'm afraid Xen simply plays no role when setting up kexec (to whatever target) from a bare metal env. Jan ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host 2024-07-30 4:02 ` [KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host A Kundu 2024-07-31 13:04 ` A Kundu @ 2024-08-05 8:12 ` Juergen Gross 1 sibling, 0 replies; 16+ messages in thread From: Juergen Gross @ 2024-08-05 8:12 UTC (permalink / raw) To: A Kundu, xen-devel; +Cc: andrew.cooper3 [-- Attachment #1.1.1: Type: text/plain, Size: 2670 bytes --] On 30.07.24 06:02, A Kundu wrote: > I am experiencing issues using kexec to load Xen 4.19-rc4 and > 4.20-dev on a debian host. > > The current documentation at > https://xenbits.xenproject.org/docs/4.19-testing/misc/kexec_and_kdump.txt > appears to be missing crucial details on properly using kexec > with the --vmm option for loading Xen. > > kexec complains the --vmm option is not present. > > System information: > $ uname -a > Linux host 6.9.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1 (2024-07-19) > x86_64 GNU/Linux > > $ kexec --version # compiled from source tarball with ./configure --with-xen > kexec-tools 2.0.29 > > Steps to reproduce: > > 1. Set variables: > > XEN_HYPERVISOR="/boot/xen.gz" > XEN_CMD="dom0_mem=6G dom0_max_vcpus=6 dom0_vcpus_pin cpufreq=xen" > > 2. Attempt to load Xen 4.19-rc4: > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > Could not find a free area of memory of 0x3b6001 bytes... > elf_exec_build_load_relocatable: ELF exec load failed > > 3. Attempt to load Xen 4.20-dev: > > # kexec -l "$XEN_HYPERVISOR" --command-line="$XEN_CMD" > Could not find a free area of memory of 0x3f8001 bytes... > elf_exec_build_load_relocatable: ELF exec load failed > > 4. Follow the steps in the Xen manual at misc/kexec_and_kdump.txt: > > # Set variables > > XEN_IMAGE="/boot/xen-4.19-rc.gz" > DOM0_IMAGE="/boot/vmlinuz-6.9.10-amd64" > DOM0_INITRD="/boot/initrd.img-6.9.10-amd64" > DOM0_MEMORY="6G" > DOM0_CPUS="0-5" > > # Prepare Xen and dom0 command line arguments > > XEN_ARGS="no-real-mode dom0_mem=${DOM0_MEMORY}" > DOM0_ARGS="max_cpus=6 dom0_max_vcpus=6 dom0_vcpus_pin" > > # Load Xen and dom0 kernel > > kexec -l --append="${XEN_ARGS} -- ${DOM0_ARGS}" --initrd=${DOM0_INITRD} \ > --vmm=${XEN_IMAGE} ${DOM0_IMAGE} > > Result: > kexec: unrecognized option '--vmm=/boot/xen-4.19-rc.gz' > > I have tried compiling kexec-tools 2.0.29 from source using > ./configure --with-xen, as well as using debian's apt version, but > both result in the same "unrecognized option '--vmm'" error. > > Please provide guidance on the correct steps to get kexec working > for loading Xen 4.19-rc4 and 4.20-dev. Additionally, I kindly > request that the documentation be updated with these details to > assist other users who may encounter this issue. The mentioned documentation hasn't seen any updates since 2008 in the part you are interested in. I believe the most sane action would be to remove the "Kexec" chapter completely. With Xen I'm not aware of any use case nowadays other than that explained in the "Kdump" chapter. Juergen [-- Attachment #1.1.2: OpenPGP public key --] [-- Type: application/pgp-keys, Size: 3743 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 495 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-08-05 8:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <05395ed2-3bf3-4926-8e24-c2e7ff37ed26.ref@yahoo.com>
2024-07-30 4:02 ` [KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host A Kundu
2024-07-31 13:04 ` A Kundu
2024-08-02 3:36 ` Baoquan He
2024-08-02 7:28 ` A Kundu
2024-08-02 7:28 ` A Kundu
2024-08-02 7:55 ` Jan Beulich
2024-08-02 7:55 ` Jan Beulich
2024-08-04 13:17 ` A Kundu
2024-08-04 13:17 ` A Kundu
2024-08-05 6:01 ` Jan Beulich
2024-08-05 6:01 ` Jan Beulich
2024-08-05 7:52 ` Juergen Gross
2024-08-05 7:52 ` Juergen Gross
2024-08-05 8:13 ` Jan Beulich
2024-08-05 8:13 ` Jan Beulich
2024-08-05 8:12 ` [KEXEC] Lacking documentation and " Juergen Gross
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.