Skip to contentSkip to conversation

Is kexec supported in QEMU for ARM64 (qemu-system-aarch64) with arm-trusted-firmware, optee, and u-boot.

DISCUSSION Lakshmi Ramasubramanian 3 participants 7 messages Sep 26, 2019 – Oct 9, 2019

lore
Share & tools
lore
#0 lore raw

When I execute kexec ("kexec -l <kernel>", followed by "kexec -e") I hit the following assert (in arm-trusted-firmware/plat/qemu/qemu_pm.c)

/*******************************************************************************
* Platform handler called when a power domain is about to be turned
* off. The target_state encodes the power state that each level should
* transition to.
******************************************************************************/ void qemu_pwr_domain_off(const psci_power_state_t *target_state)

{
	assert(0);
}

Is kexec supported in ARM64 QEMU (qemu-system-aarch64) - using arm-trusted-firmware, optee, and u-boot?

Thanks,
-lakshmi

#1 lore raw

On 9/26/19 8:17 AM, Lakshmi Ramasubramanian wrote:

The following commit for ARM Trusted Firmware for QEMU virt ARMv8-A is almost 3 years old

https://salsa.debian.org/debian/atf-allwinner/commit/b6b671c4ac4bd5595306863225bb3bece1e6135c

Current limitations:
* Only cold boot is supported
* No build instructions for QEMU_EFI.fd and rootfs-arm64.cpio.gz
* No instructions for how to load a BL32 (Secure Payload)

So looks like only cold boot is supported (no kexec support) Is this correct?

Quoted 19 lines

When I execute kexec ("kexec -l <kernel>", followed by "kexec -e") I hit the following assert (in arm-trusted-firmware/plat/qemu/qemu_pm.c)

/*******************************************************************************

 * Platform handler called when a power domain is about to be turned
 * off. The target_state encodes the power state that each level should
 * transition to.
******************************************************************************/

void qemu_pwr_domain_off(const psci_power_state_t *target_state) {
    assert(0);
}

Is kexec supported in ARM64 QEMU (qemu-system-aarch64) - using arm-trusted-firmware, optee, and u-boot?

Thanks,
 -lakshmi

#2 lore raw

Cc'ing Ard too

Quoted 38 lines · Lakshmi Ramasubramanian

On 9/26/19 8:17 AM, Lakshmi Ramasubramanian wrote:

The following commit for ARM Trusted Firmware for QEMU virt ARMv8-A is almost 3 years old

https://salsa.debian.org/debian/atf-allwinner/commit/b6b671c4ac4bd5595306863225bb3bece1e6135c

Current limitations:
* Only cold boot is supported
* No build instructions for QEMU_EFI.fd and rootfs-arm64.cpio.gz
* No instructions for how to load a BL32 (Secure Payload)

So looks like only cold boot is supported (no kexec support) Is this correct?

Quoted 20 lines

When I execute kexec ("kexec -l <kernel>", followed by "kexec -e") I hit the following assert (in arm-trusted-firmware/plat/qemu/qemu_pm.c)

/*******************************************************************************

  * Platform handler called when a power domain is about to be turned
  * off. The target_state encodes the power state that each level should
  * transition to. ******************************************************************************/

void qemu_pwr_domain_off(const psci_power_state_t *target_state) {
     assert(0);
}

Is kexec supported in ARM64 QEMU (qemu-system-aarch64) - using arm-trusted-firmware, optee, and u-boot?

Thanks,
  -lakshmi

#3 lore raw
Quoted 12 lines · Philippe Mathieu-Daudé

Cc'ing Ard too

Quoted 11 lines

https://salsa.debian.org/debian/atf-allwinner/commit/b6b671c4ac4bd5595306863225bb3bece1e6135c

Current limitations:
* Only cold boot is supported
* No build instructions for QEMU_EFI.fd and rootfs-arm64.cpio.gz
* No instructions for how to load a BL32 (Secure Payload)

So looks like only cold boot is supported (no kexec support) Is this correct?

Just wanted to check again -

Does ATF and QEMU (for ARM64) support cold boot only and does not have support for kexec?

thanks,
-lakshmi

#4 lore raw
Quoted 13 lines · Lakshmi Ramasubramanian
Quoted 10 lines · Philippe Mathieu-Daudé

Cc'ing Ard too

Quoted 9 lines

https://salsa.debian.org/debian/atf-allwinner/commit/b6b671c4ac4bd5595306863225bb3bece1e6135c

Current limitations:
* Only cold boot is supported
* No build instructions for QEMU_EFI.fd and rootfs-arm64.cpio.gz
* No instructions for how to load a BL32 (Secure Payload)

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

So looks like only cold boot is supported (no kexec support) Is this correct?

Just wanted to check again -

Does ATF and QEMU (for ARM64) support cold boot only and does not have support for kexec?

kexec is a linux concept, so whether it is supported should not depend on the secure world firmware or the underlying host.

#5 lore raw
Quoted 3 lines · Ard Biesheuvel

kexec is a linux concept, so whether it is supported should not depend on the secure world firmware or the underlying host.

I agree Ard.
When I don't use ATF I am able to do kexec in QEMU and successfully boot into the new kernel. Is the following expected?

When I execute kexec ("kexec -l <kernel>", followed by "kexec -e") I hit the following assert in ATF (in the file arm-trusted-firmware/plat/qemu/qemu_pm.c)

/*******************************************************************************
* Platform handler called when a power domain is about to be turned
* off. The target_state encodes the power state that each level should
* transition to.
******************************************************************************/ void qemu_pwr_domain_off(const psci_power_state_t *target_state)

{
     assert(0);
}

Thanks,
-lakshmi

#6 lore raw
Quoted 22 lines · Lakshmi Ramasubramanian
Quoted 3 lines · Ard Biesheuvel

kexec is a linux concept, so whether it is supported should not depend on the secure world firmware or the underlying host.

I agree Ard.
When I don't use ATF I am able to do kexec in QEMU and successfully boot into the new kernel.
Is the following expected?

When I execute kexec ("kexec -l <kernel>", followed by "kexec -e") I hit the following assert in ATF (in the file arm-trusted-firmware/plat/qemu/qemu_pm.c)

/*******************************************************************************
* Platform handler called when a power domain is about to be turned
* off. The target_state encodes the power state that each level should
* transition to.
******************************************************************************/ void qemu_pwr_domain_off(const psci_power_state_t *target_state)

Quoted 4 lines
{
      assert(0);
}

Are you running with multiple CPUs?