Re: [PATCHv8 3/5] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-10-11 Thread Hari Bathini
On 11/10/23 8:35 am, Pingfan Liu wrote: On Tue, Oct 10, 2023 at 01:56:13PM +0530, Hari Bathini wrote: On 09/10/23 5:00 pm, Pingfan Liu wrote: If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by

Re: [PATCH] kexec: Fix reboot race during device_shutdown()

2023-10-11 Thread Joel Fernandes
On Tue, Oct 10, 2023 at 5:08 PM Eric W. Biederman wrote: > > Joel Fernandes writes: [...] > >> That way you can get the orderly shutdown > >> of userspace daemons/services along with an orderly shutdown of > >> everything the kernel is responsible for. > > > > Fixing in userspace is an option

Re: [PATCH 09/13] x86/tdx: Account shared memory

2023-10-11 Thread kirill.shute...@linux.intel.com
On Tue, Oct 10, 2023 at 10:05:21AM +, Huang, Kai wrote: > > > +#ifdef CONFIG_DEBUG_FS > > +static int tdx_shared_memory_show(struct seq_file *m, void *p) > > +{ > > + unsigned long addr, end; > > + unsigned long found = 0; > > + > > + addr = PAGE_OFFSET; > > + end = PAGE_OFFSET +

Re: [PATCH 04/13] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-10-11 Thread Kirill A. Shutemov
On Tue, Oct 10, 2023 at 06:53:27AM -0700, Kuppuswamy Sathyanarayanan wrote: > > > On 10/5/2023 6:13 AM, Kirill A. Shutemov wrote: > > kvm_guest_cpu_offline() tries to disable kvmclock regardless if it is > > present in the VM. It leads to write to a MSR that doesn't exist on some > >

Re: [PATCH 03/13] cpu/hotplug, x86/acpi: Disable CPU hotplug for ACPI MADT wakeup

2023-10-11 Thread Thomas Gleixner
On Thu, Oct 05 2023 at 16:13, Kirill A. Shutemov wrote: > > + /* Disable CPU onlining/offlining */ That's not what the function does. > + cpu_hotplug_not_supported(); Thanks, tglx ___ kexec mailing list kexec@lists.infradead.org

Re: [PATCH 02/13] kernel/cpu: Add support for declaring CPU hotplug not supported

2023-10-11 Thread Kirill A. Shutemov
On Tue, Oct 10, 2023 at 06:35:59AM -0700, Kuppuswamy Sathyanarayanan wrote: > > > On 10/5/2023 6:13 AM, Kirill A. Shutemov wrote: > > The function cpu_hotplug_not_supported() can be called to indicate that > > CPU hotplug should be disabled. It does not prevent the initial bring up > > of the

Re: [PATCH 02/13] kernel/cpu: Add support for declaring CPU hotplug not supported

2023-10-11 Thread Thomas Gleixner
On Thu, Oct 05 2023 at 16:13, Kirill A. Shutemov wrote: > The function cpu_hotplug_not_supported() can be called to indicate that > CPU hotplug should be disabled. It does not prevent the initial bring up > of the CPU, but it stops subsequent offlining. This tells me what the patch is doing, but

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-11 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [   74.783235] sysrq: Trigger a crash [   74.783244] Kernel panic - not syncing: sysrq triggered crash [   74.783252]

[PATCH kexec-tools] workflow: update to Ubuntu 22.04

2023-10-11 Thread Simon Horman
Bump workflow to use latest LTS release. Signed-off-by: Simon Horman --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c6e9d730488..d0007f14b274 100644 ---

Re: [PATCH] kexec/loongarch64: fix 'make dist' file loss issue

2023-10-11 Thread Simon Horman
On Wed, Oct 11, 2023 at 11:56:21AM +0800, Ming Wang wrote: > The Makefile omits the iomem.h file, causing the archive file > generated by 'make dist' to lose iomem.h. This patch is used to > fix this problem. > > Signed-off-by: Ming Wang Thanks, applied.

[PATCH 2/2] riscv: kexec: Remove -fPIE for PURGATORY_CFLAGS

2023-10-11 Thread Song Shuai
With CONFIG_RELOCATABLE enabled, KBUILD_CFLAGS had a -fPIE option and then the purgatory/string.o was built to reference _ctype symbol via R_RISCV_GOT_HI20 relocations which can't be handled by purgatory. As a consequence, the kernel failed kexec_load_file() with: [ 880.386562] kexec_image: The

[PATCH 1/2] riscv: kexec: Cleanup riscv_kexec_relocate

2023-10-11 Thread Song Shuai
For readability and simplicity, cleanup the riscv_kexec_relocate code: - Re-sort the first 4 `mv` instructions against `riscv_kexec_method()` - Eliminate registers for debugging (s9,s10,s11) and storing const-value (s5,s6) - Replace `jalr` with `jr` for no-link jump I tested this on Qemu virt

[PATCH V2 0/2] riscv: kexec: cleanup and fixups

2023-10-11 Thread Song Shuai
Changes since V1: https://lore.kernel.org/linux-riscv/20230907103304.590739-1-songshuaish...@tinylab.org/ - the old Patch2 in V1 had been merged to riscv/fixes, so take it out of this series - Patch1 : replace `.align 2` with `.balign 4` as Andreas suggested - Patch2 : fix the conflict caused