Hi Lennart,
I spent some time understanding the systemd-pcrlock and TPM stuff, and
got some idea about it. Could you correct me if I'm wrong? Please see
the following comments inlined.
On Mon, Aug 26, 2024 at 9:40 PM Lennart Poettering wrote:
>
> On Do, 22.08.24 22:29, Ping
On Thu, Aug 29, 2024 at 1:08 AM Ard Biesheuvel wrote:
>
[...]
Hi Ard,
Thanks for sharing your insight and thoughts.
>
> Thanks for putting this RFC together. This is useful work, and gives
> us food for thought and discussion.
>
> There are a few problems that become apparent when going through
On Thu, Aug 22, 2024 at 4:23 PM Lennart Poettering wrote:
>
> On Do, 22.08.24 13:42, Pingfan Liu (pi...@redhat.com) wrote:
>
> > On Wed, Aug 21, 2024 at 10:27 PM Lennart Poettering
> > wrote:
> > >
> > > On Mo, 19.08.24 22:53, Pingfan Liu (pi...@redhat.c
On Thu, Aug 22, 2024 at 2:17 PM Dave Young wrote:
>
> On Thu, 22 Aug 2024 at 13:42, Pingfan Liu wrote:
> >
> > On Wed, Aug 21, 2024 at 10:27 PM Lennart Poettering
> > wrote:
> > >
> > > On Mo, 19.08.24 22:53, Pingfan Liu (pi...@redha
On Thu, Aug 22, 2024 at 4:23 PM Lennart Poettering wrote:
>
> On Do, 22.08.24 13:42, Pingfan Liu (pi...@redhat.com) wrote:
>
> > On Wed, Aug 21, 2024 at 10:27 PM Lennart Poettering
> > wrote:
> > >
> > > On Mo, 19.08.24 22:53, Pingfan Liu (pi...@redhat.c
On Wed, Aug 21, 2024 at 10:27 PM Lennart Poettering
wrote:
>
> On Mo, 19.08.24 22:53, Pingfan Liu (pi...@redhat.com) wrote:
>
> > *** Background ***
> >
> > As more PE format kernel images are introduced, it post challenge to kexec
> > to
> > cope with t
From: Pingfan Liu
efi emulator aims to serve the kexec if the kernel wrapped by efistub.
It is paired with efistub, so only implements the minimus set of EFI boot
service which merely enough boots up efistub.
To simplify the code, the task such as the building of page table etc is
shift to the
From: Pingfan Liu
efi emulator aims to serve the kexec if the kernel wrapped by efistub.
It is paired with efistub, so only implements the minimus set of EFI boot
service which merely enough boots up efistub.
To simplify the code, the task such as the building of page table etc is
shift to the
On Thu, Jul 18, 2024 at 4:58 PM Pingfan Liu wrote:
>
> From: Pingfan Liu
>
> efi emulator aims to serve the kexec if the kernel wrapped by efistub.
> It is paired with efistub, so only implements the minimus set of EFI boot
> service which merely enough boots up efistub.
>
&
On Tue, Aug 20, 2024 at 2:00 AM Jarkko Sakkinen wrote:
>
> On Mon Aug 19, 2024 at 5:53 PM EEST, Pingfan Liu wrote:
> > efi_random_alloc() demands EFI_ALLOCATE_ADDRESS when allocate_pages(),
> > but the current implement can not ensure the selected target locates
> > insi
Now, anything is ready, enable PE image loading on arm64
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Mark Rutland
Cc: Will Deacon
Cc: Catalin Marinas
To: linux-arm-ker...@lists.infradead.org
---
arch/arm64/Kconfig | 4
arch/arm64/kernel/machine_kexec_file.c
kexec segments and efi
runtime service. This reduces the memory consumption of page table.
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Mark Rutland
Cc: Will Deacon
Cc: Catalin Marinas
To: linux-arm-ker...@lists.infradead.org
---
arch/arm64/kernel/machine_kexec.c | 101
allocator and hence of the
__create_pgd_mapping_locked().
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Mark Rutland
Cc: Will Deacon
Cc: Catalin Marinas
To: linux-arm-ker...@lists.infradead.org
---
arch/arm64/include/asm/mmu.h | 6
arch/arm64/mm/mmu.c | 67
->dtb_mem as scratch and introduce another member
'param_mem'
When booting vmlinux, param_mem equals dtb_mem.
Signed-off-by: Pingfan Liu
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Mark Rutland
Cc: Ard Biesheuvel
To: linux-arm-ker...@lists.infradead.org
---
arch/arm64/include/asm/kexec.
].
After that, this patch can be drop.
But let us focus on emulator itself and keep things simple for the time
being.
[1]:
https://lore.kernel.org/linux-arm-kernel/20240328115656.24090-1-pi...@redhat.com/
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Mark Rutland
Cc: linux-arm-ker
ne to set up
identity map for all memory used in 'efi emulator'
To do: This is a POC version, at present, it aims for arm64, later, it
needs abstraction to cope with x86
Signed-off-by: Pingfan Liu
Cc: Baoquan He
Cc: Dave Young
Cc: Eric Biederman
Cc: Ard Biesheuvel
Cc: lin
efi_random_alloc() demands EFI_ALLOCATE_ADDRESS when allocate_pages(),
but the current implement can not ensure the selected target locates
inside free area, that is to exclude EFI_BOOT_SERVICES_*,
EFI_RUNTIME_SERVICES_* etc.
Fix the issue by checking md->type.
Signed-off-by: Pingfan Liu
Some uefi applications e.g systemd-stub uses more members in
efi_simple_text_output_protocol, hence extending its members as UEFI
specification.
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
To: linux-...@vger.kernel.org
---
drivers/firmware/efi/libstub/efistub.h | 7 +++
1 file changed, 7
er.kernel.org
Pingfan Liu (9):
efi/libstub: Ask efi_random_alloc() to skip unusable memory
efi/libstub: Complete efi_simple_text_output_protocol
efi/emulator: Initial rountines to emulate EFI boot time service
efi/emulator: Turn on mmu for arm64
kexec: Introduce kexec_pe_image to parse and
On Fri, Jul 19, 2024 at 1:20 AM Jarkko Sakkinen wrote:
>
> On Thu, 2024-07-18 at 16:57 +0800, Pingfan Liu wrote:
> > efi_random_alloc() demands EFI_ALLOCATE_ADDRESS when allocate_pages(),
> > but the current implement can not ensure the selected target locates
> > insi
On Thu, Jul 18, 2024 at 4:58 PM Pingfan Liu wrote:
>
>
> *** Background ***
>
> As more PE format kernel images are introduced, it post challenge to kexec to
> cope with the new format.
>
> In my attempt to add support for arm64 zboot image in the kernel [1],
> Ard sug
allocator and hence of the
__create_pgd_mapping_locked().
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Jan Hendrik Farr
Cc: Philipp Rudo
Cc: Lennart Poettering
Cc: Jarkko Sakkinen
Cc: Baoquan He
Cc: Dave Young
Cc: Mark Rutland
Cc: Will Deacon
Cc: Catalin Marinas
To: linux-arm-ker
kexec segments, and this
reduces the memory consumption of page table.
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Jan Hendrik Farr
Cc: Philipp Rudo
Cc: Lennart Poettering
Cc: Jarkko Sakkinen
Cc: Baoquan He
Cc: Dave Young
Cc: Mark Rutland
Cc: Will Deacon
Cc: Catalin Marinas
To: linux
].
After that, this patch can be drop.
But let us focus on emulator itself and keep things simple for the time
being.
[1]:
https://lore.kernel.org/linux-arm-kernel/20240328115656.24090-1-pi...@redhat.com/
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Jan Hendrik Farr
Cc: Philipp Rudo
Cc
For POC, step around these four function, hence the corresponding boot services.
Later those services should be implemented and this patch should be
drop.
Signed-off-by: Pingfan Liu
Cc: Ard Biesheuvel
Cc: Jan Hendrik Farr
Cc: Philipp Rudo
Cc: Lennart Poettering
Cc: Jarkko Sakkinen
Cc
efi_random_alloc() demands EFI_ALLOCATE_ADDRESS when allocate_pages(),
but the current implement can not ensure the selected target locates
inside free area, that is to exclude EFI_BOOT_SERVICES_*,
EFI_RUNTIME_SERVICES_* etc.
Fix the issue by checking md->type.
Signed-off-by: Pingfan Liu
m-ker...@lists.infradead.org
To: kexec@lists.infradead.org
To: linux-...@vger.kernel.org
Pingfan Liu (7):
efi/libstub: Ask efi_random_alloc() to skip unusable memory
debug/libstub: cheats to step around some boot service
efi/emulator: Initial rountines to emulate EFI boot time service
26, 2024 at 3:40 AM Christophe Leroy
wrote:
>
> Hi,
>
> Le 22/05/2018 à 10:23, Pingfan Liu a écrit :
> > For kexec -p, the boot cpu can be not the cpu0, this causes the problem
> > to alloc paca[]. In theory, there is no requirement to assign cpu's logical
> > i
From: Pingfan Liu
This patch always forces the first core onlined due to some subsystem
needs cpu0. After core0, a hole may follow, then comes the crashed core.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc
From: Pingfan Liu
This patch aims to mark all the arrays which size is decided by
nr_cpu_ids or num_possible_cpus(). Later if a hole is allowed in
cpu_possible_mask, the corresponding array should extend to hold the
last bit number in cpu_possible_mask.
Signed-off-by: Pingfan Liu
Cc: Michael
From: Pingfan Liu
Between early_setup()->allocate_paca_ptrs() and
smp_setup_cpu_maps()->free_unused_pacas(), there is no call to
set_nr_cpu_ids(), which means nr_cpu_ids is unchanged.
Hence removing the check.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Pigg
From: Pingfan Liu
This series addresses the nr_cpus issue for PowerPC without re-ordering
cpu number. To save the memory used by percpu area, it also limits the
possible cpu numbers by allowing hole in cpu_possible_mask.
Because the last cpu number will bigger than nr_cpu_ids in this way,
some
From: Pingfan Liu
First of all, this series is only for proof of concept. It only passes
compilation.
For years, CMA is proposed to be used as crashkernel reserved memory.
But DIO prevent us to follow it since DMA may be in-flight and ruin the
kdump kernel.
This series exports the crash
From: Pingfan Liu
Signed-off-by: Pingfan Liu
Cc: Jiri Bohac
Cc: Michal Hocko
Cc: Philipp Rudo
Cc: Baoquan He
Cc: Dave Young
To: kexec@lists.infradead.org
---
drivers/of/kexec.c| 14 ++
include/linux/kexec.h | 4
2 files changed, 18 insertions(+)
diff --git a/drivers
From: Pingfan Liu
Signed-off-by: Pingfan Liu
Cc: Jiri Bohac
Cc: Michal Hocko
Cc: Philipp Rudo
Cc: Baoquan He
Cc: Dave Young
To: kexec@lists.infradead.org
---
drivers/of/fdt.c | 43 +++
1 file changed, 43 insertions(+)
diff --git a/drivers/of/fdt.c
From: Pingfan Liu
Signed-off-by: Pingfan Liu
Cc: Jiri Bohac
Cc: Michal Hocko
Cc: Philipp Rudo
Cc: Baoquan He
Cc: Dave Young
To: kexec@lists.infradead.org
---
include/linux/kexec.h | 1 +
init/main.c | 4 +++
kernel/crash_dump.c | 80
From: Pingfan Liu
The default size reserved for crashkernel=,low is decided by the macro
DEFAULT_CRASH_KERNEL_LOW_SIZE, which is based on arch.
Signed-off-by: Pingfan Liu
Cc: Baoquan He
Cc: Dave Young
To: kexec@lists.infradead.org
To: linux-...@vger.kernel.org
---
Documentation/admin-guide
On Thu, Nov 30, 2023 at 9:43 PM Michal Hocko wrote:
>
> On Thu 30-11-23 21:33:04, Pingfan Liu wrote:
> > On Thu, Nov 30, 2023 at 9:29 PM Michal Hocko wrote:
> > >
> > > On Thu 30-11-23 20:04:59, Baoquan He wrote:
> > > > On 11/30/23 at 11:16am, Michal Ho
On Thu, Nov 30, 2023 at 9:29 PM Michal Hocko wrote:
>
> On Thu 30-11-23 20:04:59, Baoquan He wrote:
> > On 11/30/23 at 11:16am, Michal Hocko wrote:
> > > On Thu 30-11-23 11:00:48, Baoquan He wrote:
> > > [...]
> > > > Now, we are worried if there's risk if the CMA area is retaken into
> > > > kdu
Hi Hari,
On Mon, Nov 27, 2023 at 12:30 PM Hari Bathini wrote:
>
> Hi Pingfan, Michael,
>
> On 17/10/23 4:03 pm, Hari Bathini wrote:
> >
> >
> > On 17/10/23 7:58 am, Pingfan Liu wrote:
> >> *** Idea ***
> >> For kexec -p, the boot cpu can
On Sun, Nov 26, 2023 at 5:24 AM Jiri Bohac wrote:
>
> Hi Tao,
>
> On Sat, Nov 25, 2023 at 09:51:54AM +0800, Tao Liu wrote:
> > Thanks for the idea of using CMA as part of memory for the 2nd kernel.
> > However I have a question:
> >
> > What if there is on-going DMA/RDMA access on the CMA range wh
On Tue, Oct 17, 2023 at 6:39 PM Hari Bathini wrote:
>
>
>
> On 17/10/23 7:58 am, 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 i
s, at this phase, all threads in the boot core are forced to
be onlined. This restriction will be lifted in a later patch with
extra effort.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
C
From: Pingfan Liu
Since my last v4 [1], the code has undergone great changes. The paca[]
array has been reorganized and indexed by paca_ptrs[], which
dramatically decreases the memory consumption even if there are many
unpresent cpus in the middle.
However, reordering the logical cpu numbers
carry that information
for PPC32 in the coming patch.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: Sourabh Jain
Cc: Hari Bathini
Cc: kexec@lists.infradead.org
To: linuxppc
On Mon, Oct 16, 2023 at 12:13:53PM +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 > /pr
On Wed, Oct 11, 2023 at 6:53 PM 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: Tr
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, the
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
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:
s, at this phase, all threads in the boot core are forced to
be onlined. This restriction will be lifted in a later patch with
extra effort.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
carry that information
for PPC32 in the coming patch.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: kexec@lists.infradead.org
To: linuxppc-...@lists.ozlabs.org
---
arch/powerpc
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
successive patches
Signed-off-by: Pingfan
x27;
the kdump kernel brings up two cpus.
While when taskset -c 4 bash -c 'echo c > /proc/sysrq-trigger',
the kdump kernel brings up one cpu.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
ing the mask. In this way, the unpopulated
pcpu struct can be skipped and left unaccessed.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: kexec@lists.infradead.org
To: linux
he Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: kexec@lists.infradead.org
To: linuxppc-...@lists.ozlabs.org
Pingfan Liu (5):
powerpc/setup : Enable boot_cpu_hwid for PPC32
powerpc/setup: Loosen the mapping between cpu logical id and its seq
in dt
power
On Wed, Oct 4, 2023 at 2:07 AM Mahesh J Salgaonkar wrote:
>
> On 2023-09-25 15:53:48 Mon, Pingfan Liu wrote:
> > paca_ptrs should be large enough to hold the boot_cpuid, hence, its
> > lower boundary is set to the bigger one between boot_cpuid+1 and
> > nr_cpus.
> &g
on the DBG macro and not catch this bug.
Thanks,
Pingfan
> cpu++;
> }
> + }
>
> -Original Message-
> From: Pingfan Liu
> Sent: Monday, September 25, 2023 2:54 AM
> To: linuxppc-...@lists.ozlabs.org
> Cc: Pingfan Liu ; Michael Ellerman ;
> Nicholas
x27;
the kdump kernel brings up two cpus.
While when taskset -c 4 bash -c 'echo c > /proc/sysrq-trigger',
the kdump kernel brings up one cpu.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
carry that information
for PPC32 in the coming patch.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: kexec@lists.infradead.org
To: linuxppc-...@lists.ozlabs.org
Reported-by: kernel
s, at this phase, all threads in the boot core are forced to
be onlined. This restriction will be lifted in a later patch with
extra effort.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
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
next patch
Signed-off-by: Pingfan Liu
Cc
linuxppc-...@lists.ozlabs.org
Pingfan Liu (4):
powerpc/setup : Enable boot_cpu_hwid for PPC32
powerpc/setup: Loosen the mapping between cpu logical id and its seq
in dt
powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus
powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid
arch
On Fri, Sep 22, 2023 at 1:19 PM Jan Hendrik Farr wrote:
>
> Hi Pingfan!
>
> On 21 21:37:01, Pingfan Liu wrote:
> > From: Pingfan Liu
> >
>
> > For security boot, the vmlinuz.efi will be signed so UEFI boot loader
> > can check against it. But at present, t
From: Pingfan Liu
Emulate the scheme of module signing to sign the zboot's payload i.e.
Image before it is compressed.
And overall, the signature on vmlinuz.efi will be used by UEFI boot
loader and the signature on Image will be used by kexec file load.
Signed-off-by: Pingfan Liu
Cc:
From: Pingfan Liu
I hesitate to post this series, since Ard has recommended using an
emulated UEFI boot service to resolve the UKI kexec load problem [1].
since on aarch64, vmlinuz.efi has faced the similar issue at present.
But anyway, I have a crude outline of it and am sending it out for
From: Pingfan Liu
Enable the signing on the kernel image if both KEXEC_SIG and EFI_ZBOOT
are configured.
Signed-off-by: Pingfan Liu
Cc: "Ard Biesheuvel "
Cc: "Jan Hendrik Farr"
Cc: "Baoquan He"
Cc: "Dave Young"
Cc: "Philipp Rudo"
Cc: Ard
kexec/kexec.h
> +++ b/kexec/kexec.h
> @@ -267,6 +267,7 @@ extern void die(const char *fmt, ...)
> __attribute__ ((format (printf, 1, 2)));
> extern void *xmalloc(size_t size);
> extern void *xrealloc(void *ptr, size_t size);
> +extern char *slurp_fd(int fd, const ch
a/kexec/kexec.h
> +++ b/kexec/kexec.h
> @@ -267,6 +267,7 @@ extern void die(const char *fmt, ...)
> __attribute__ ((format (printf, 1, 2)));
> extern void *xmalloc(size_t size);
> extern void *xrealloc(void *ptr, size_t size);
> +extern char *slurp_fd(int fd, const cha
t initialized to a proper present cpu. -2. power9_idle_stop() assumes
the primary thread's paca is allocated.
Hence lift nr_cpu_ids from one to two to ensure cpu0 is onlined, if the
boot cpu is not cpu0.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe
o tackle with the issue if nr_cpu_ids
is
configured as a constant
Pingfan Liu (3):
powerpc/setup: Loosen the mapping between cpu logical id and its seq
in dt
powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus
powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid
arch
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
next patch
Signed-off-by: Pingfan Liu
Cc
sides this, at this phase, all threads in the boot core are forced to
be onlined. This restriction will be lifted in a later patch with
extra effort.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc
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
next patch
Signed-off-by: Pingfan Liu
Cc
t initialized to a proper present cpu. -2. power9_idle_stop() assumes
the primary thread's paca is allocated.
Hence lift nr_cpu_ids from one to two to ensure cpu0 is onlined, if the
boot cpu is not cpu0.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe
s, at this phase, all threads in the boot core are forced to
be onlined. This restriction will be lifted in a later patch with
extra effort.
Signed-off-by: Pingfan Liu
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
uxppc-dev/1520829790-14029-1-git-send-email-kernelf...@gmail.com/
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Mahesh Salgaonkar
Cc: Wen Xiong
Cc: Baoquan He
Cc: Ming Lei
Cc: kexec@lists.infradead.org
To: linuxppc-...@lists.ozlabs.org
Pingfan Liu (3):
powerpc/setup: L
On Sun, Aug 27, 2023 at 4:23 AM Alexander Kamensky
wrote:
>
> Hi Pingfan,
>
> Please see inline
>
> On Thu, Aug 24, 2023 at 11:17 PM Pingfan Liu wrote:
> >
> > On Sun, Aug 20, 2023 at 3:16 AM Alexander Kamensky
> > wrote:
> > >
> > > In the
On Sun, Aug 20, 2023 at 3:16 AM Alexander Kamensky
wrote:
>
> In the latest openembedded with aarch64 image that uses 6.4.3 kernel on qemu I
> tried to run makedumpfile in secondary kernel with /proc/vmcore. It failed as
> follows:
>
> > root@qemuarm64:~# makedumpfile -c -F /proc/vmcore > /dev/nul
On Mon, Aug 7, 2023 at 9:23 PM Simon Horman wrote:
>
> On Thu, Aug 03, 2023 at 10:41:50AM +0800, Pingfan Liu wrote:
> > From: Jeremy Linton
> >
> > The linux kernel CONFIG_ZBOOT option creates
> > self decompressing PE kernel images. So this means
> &
essed to a temporary file.
Signed-off-by: Jeremy Linton
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
kexec/arch/arm64/Makefile | 3 ++-
kexec/arch/arm64/kexec-arm64.c | 1 +
kexec/arch/arm64/kexec-arm64.h
roduce kexec_info.kernel_fd and return the fd through image load
interface.
Jeremy Linton (3):
kexec/zboot: Add arch independent zboot support
arm64: Add ZBOOT PE containing compressed image support
arm64: Hook up the ZBOOT support as vmlinuz
Pingfan Liu (2):
kexec/arm64: Simplify the code for
a memfd based on the result produced by
slurp_decompress_file(), and finally simplify the logical of the probe
for aarch64.
The credit goes to the Dave Young, who contributes the original code.
Signed-off-by: Pingfan Liu
Co-authored-by: Dave Young
To: kexec@lists.infradead.org
Cc: ho
alternate kernel image around.
This patch adds a the _probe(), _load() and usage() routines needed for
kexec to understand this format.
Signed-off-by: Jeremy Linton
[Modified by Pingfan to export kernel fd with load method]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho
-off-by: Jeremy Linton
[Modified by Pingfan to export kernel fd]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
include/Makefile | 1 +
include/kexec-pe-zboot.h | 15 +
kexec/Makefile | 1
Utilize the image load interface to export the kernel fd, which points
to the uncompressed kernel and will be passed to kexec_file_load.
The credit goes to the Dave Young, who contributes the original code.
Signed-off-by: Pingfan Liu
Co-authored-by: Dave Young
To: kexec@lists.infradead.org
Cc
On Wed, Aug 2, 2023 at 8:33 PM Simon Horman wrote:
>
> On Wed, Aug 02, 2023 at 02:17:57PM +0200, Simon Horman wrote:
> > On Wed, Aug 02, 2023 at 02:16:33PM +0200, Simon Horman wrote:
> > > On Wed, Aug 02, 2023 at 05:53:59PM +0800, Pingfan Liu wrote:
> > > > Hi
Hi Simon,
Thanks for the try. Please see the comment below.
On Tue, Aug 1, 2023 at 3:00 PM Simon Horman wrote:
>
> On Mon, Jul 24, 2023 at 10:21:40AM +0800, Pingfan Liu wrote:
> > From: Jeremy Linton
> >
> > The linux kernel CONFIG_ZBOOT option creates
> > self
-off-by: Jeremy Linton
[Modified by Pingfan to export kernel fd]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
include/kexec-pe-zboot.h | 15 +
kexec/Makefile | 1 +
kexec/kexec-pe-zboot.c | 131
alternate kernel image around.
This patch adds a the _probe(), _load() and usage() routines needed for
kexec to understand this format.
Signed-off-by: Jeremy Linton
[Modified by Pingfan to export kernel fd with load method]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho
ace.
Jeremy Linton (3):
kexec/zboot: Add arch independent zboot support
arm64: Add ZBOOT PE containing compressed image support
arm64: Hook up the ZBOOT support as vmlinuz
Pingfan Liu (2):
kexec/arm64: Simplify the code for zImage
kexec: Introduce a member kernel_fd in kexec_info
include/kexec
essed to a temporary file.
Signed-off-by: Jeremy Linton
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
kexec/arch/arm64/Makefile | 3 ++-
kexec/arch/arm64/kexec-arm64.c | 1 +
kexec/arch/arm64/kexec-arm64.h
Utilize the image load interface to export the kernel fd, which points
to the uncompressed kernel and will be passed to kexec_file_load.
The credit goes to the Dave Young, who contributes the original code.
Signed-off-by: Pingfan Liu
Co-authored-by: Dave Young
To: kexec@lists.infradead.org
Cc
a memfd based on the result produced by
slurp_decompress_file(), and finally simplify the logical of the probe
for aarch64.
The credit goes to the Dave Young, who contributes the original code.
Signed-off-by: Pingfan Liu
Co-authored-by: Dave Young
To: kexec@lists.infradead.org
Cc: ho
On Thu, Jul 20, 2023 at 3:27 PM Dave Young wrote:
>
> Hi Pingfan,
>
> On Thu, 20 Jul 2023 at 10:05, Pingfan Liu wrote:
> >
> > Hi Dave,
> >
> > Thanks for your insight. Please see the comments inline below.
> >
> > On Wed, Jul 19, 2023 at 11:00 AM
Hi Dave,
Thanks for your insight. Please see the comments inline below.
On Wed, Jul 19, 2023 at 11:00 AM Dave Young wrote:
>
> Hi Pingfan, Simon,
>
> On 07/17/23 at 09:07pm, Pingfan Liu wrote:
> > As more complicated capsule kernel format occurs like zboot, where the
> &
essed to a temporary file.
Signed-off-by: Jeremy Linton
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
kexec/arch/arm64/Makefile | 3 ++-
kexec/arch/arm64/kexec-arm64.c | 1 +
kexec/arch/arm64/kexec-arm64.h | 3
alternate kernel image around.
This patch adds a the _probe() and usage() routines needed
for kexec to understand this format.
Signed-off-by: Jeremy Linton
[Modified by Pingfan to adapt the new probe interface]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a
-off-by: Jeremy Linton
[Modified by Pingfan to adapt the new probe interface]
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
include/kexec-pe-zboot.h | 15 +
kexec/Makefile | 1 +
kexec/kexec-pe
Since all arm64 images have transfer from the interface probe() to
probe2(), the snippet dedicated for aarch64 to call probe() can be
dropped now.
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
kexec/kexec.c | 10
1 - 100 of 369 matches
Mail list logo