Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2023-10-10 Thread Song Shuai
在 2023/9/20 19:56, Simon Horman 写道: On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote: Hi, This series is created to improve RISC-V port of kexec-tools, and is based on the horms/kexec-tools:build-test-riscv-v2 branch. In my mind the big question is how to move RISC-V support from

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

2023-10-10 Thread Ming Wang
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 --- kexec/arch/loongarch/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/kexec/arch/loongarch/Makefile b/kexec/arc

Re: [kexec-tools] Archive file is missed iomem.h file under loongarch architecture.

2023-10-10 Thread Ming Wang
Hi, Simon On 10/10/23 21:01, Simon Horman wrote: > On Mon, Oct 09, 2023 at 05:47:43PM +0800, Ming Wang wrote: >> Hi,  maintainers, >> >> >> I get the kexec-tools 2.0.27 from >> http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.27.tar.gz,  >> >> But I noticed that the kexec-tools-2.0.

Re: [PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 04:07:00PM +0530, Hari Bathini wrote: > > > On 09/10/23 5:00 pm, Pingfan Liu wrote: > > *** Idea *** > > For kexec -p, the boot cpu can be not the cpu0, this causes the problem > > of allocating memory for paca_ptrs[]. However, in theory, there is no > > requirement to ass

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

2023-10-10 Thread Pingfan Liu
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 > > reserving the last quota for the boot

Re: [kexec-tools] Archive file is missed iomem.h file under loongarch architecture.

2023-10-10 Thread Ming Wang
Hi, Simon Thank you for your reply. On 10/10/23 21:01, Simon Horman wrote: > On Mon, Oct 09, 2023 at 05:47:43PM +0800, Ming Wang wrote: >> Hi,  maintainers, >> >> >> I get the kexec-tools 2.0.27 from >> http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.27.tar.gz,  >> >> But I notice

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

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 02:38:40PM +0530, Sourabh Jain wrote: > 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:

Re: [PATCH makedumpfile V2 0/2] Add riscv64 support for makedumpfile

2023-10-10 Thread 萩尾 一仁
On 2023/10/10 23:12, Song Shuai wrote: > Changes since V1: > https://lore.kernel.org/kexec/20230927111822.180630-1-songshuaish...@tinylab.org/ > > - fix a typo in Patch2's commit-msg > - adjust some indentions of Patch1 Thank you, but already applied the v1 patches with fixes on my end: https://g

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

2023-10-10 Thread Eric W. Biederman
Joel Fernandes writes: > On Mon, Oct 9, 2023 at 11:30 AM Eric W. Biederman > wrote: >> >> Joel Fernandes writes: >> >> > On Mon, Oct 2, 2023 at 2:18 PM Joel Fernandes >> > wrote: >> > [..] >> >> > > Such freezing is already being done if kernel supports KEXEC_JUMP and >> >> > > kexec_image->

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

2023-10-10 Thread Joel Fernandes
On Mon, Oct 9, 2023 at 10:00 AM Steven Rostedt wrote: > > On Sat, 7 Oct 2023 21:30:42 -0400 > Joel Fernandes wrote: > > > Just checking how we want to proceed, is the consensus that we should > > prevent kernel crashes without relying on userspace stopping all > > processes? Should we fix regular

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

2023-10-10 Thread Joel Fernandes
On Mon, Oct 9, 2023 at 11:30 AM Eric W. Biederman wrote: > > Joel Fernandes writes: > > > On Mon, Oct 2, 2023 at 2:18 PM Joel Fernandes > > wrote: > > [..] > >> > > Such freezing is already being done if kernel supports KEXEC_JUMP and > >> > > kexec_image->preserve_context is true. However, doi

[PATCH makedumpfile V2 2/2] riscv64: Correct the pfn_start for flatmem

2023-10-10 Thread Song Shuai
To let info->max_mapnr indicate the direct max PFN and then make the kdump header's max_mapnr_64 correct, riscv64 port didn't define ARCH_PFN_OFFSET. As for FLATMEM type, the pfn region of mem_map_data should be adjusted to start from info->phys_base instead of zero. Signed-off-by: Song Shuai --

[PATCH makedumpfile V2 0/2] Add riscv64 support for makedumpfile

2023-10-10 Thread Song Shuai
Changes since V1: https://lore.kernel.org/kexec/20230927111822.180630-1-songshuaish...@tinylab.org/ - fix a typo in Patch2's commit-msg - adjust some indentions of Patch1 These 2 patches add riscv64 support for makedumpfile: Patch1 - Add riscv64 support === This patch

[PATCH makedumpfile V2 1/2] Add riscv64 support

2023-10-10 Thread Song Shuai
This patch adds support for riscv64 in makedumpfile. It implements the "vtop" for kenrel memory regions and supports Sv39/Sv48/Sv57 page modes for RV64. Signed-off-by: Song Shuai --- Makefile | 2 +- arch/riscv64.c | 219 + makedumpfile.c |

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

2023-10-10 Thread Kuppuswamy Sathyanarayanan
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 > configurations, namely in TDX guest: > > unchecked MSR access error: WRMSR to 0x12 (tried to

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

2023-10-10 Thread Kuppuswamy Sathyanarayanan
On 10/5/2023 6:13 AM, Kirill A. Shutemov wrote: > ACPI MADT doesn't allow to offline CPU after it got woke up. > I think you can use the term "CPU hotplug" instead of just offline. > Currently hotplug prevented based on the confidential computing > attribute which is set for Intel TDX. But TD

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

2023-10-10 Thread Kuppuswamy Sathyanarayanan
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 CPU, but it stops subsequent offlining. > > This function is intended to replace CC_ATTR_

Re: [kexec-tools] Archive file is missed iomem.h file under loongarch architecture.

2023-10-10 Thread Simon Horman
On Mon, Oct 09, 2023 at 05:47:43PM +0800, Ming Wang wrote: > Hi,  maintainers, > > > I get the kexec-tools 2.0.27 from > http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.27.tar.gz,  > > But I noticed that the kexec-tools-2.0.27/kexec/arch/loongarch/iomem.h file > was missing from

Re: [PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-10 Thread Hari Bathini
On 09/10/23 5:00 pm, Pingfan Liu wrote: *** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes the problem of allocating memory for paca_ptrs[]. However, in theory, there is no requirement to assign cpu's logical id as its present sequence in the device tree. But there is som

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

2023-10-10 Thread Huang, Kai
> /* Physical address of the Multiprocessor Wakeup Structure mailbox */ > @@ -74,6 +75,9 @@ int __init acpi_parse_mp_wake(union acpi_subtable_headers > *header, > > acpi_mp_wake_mailbox_paddr = mp_wake->base_address; > > + /* Disable CPU onlining/offlining */ > + cpu_hotplug_no

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

2023-10-10 Thread Huang, Kai
> +#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 + get_max_mapped(); > + > + while (addr < end) { > + unsign

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

2023-10-10 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

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

2023-10-10 Thread Hari Bathini
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 reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the

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

2023-10-10 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

Re: [PATCH makedumpfile 0/2] Add riscv64 support for makedumpfile

2023-10-10 Thread 萩尾 一仁
On 2023/10/07 11:27, Song Shuai wrote: > > > 在 2023/10/3 12:22, HAGIO KAZUHITO(萩尾 一仁) 写道: >> Hi, >> >> thank you for the patch. >> >> On 2023/09/27 20:18, Song Shuai wrote: >>> These 2 patches add riscv64 support for makedumpfile: >>> >>> Patch1 - Add riscv64 support >>> =