Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/docker/qemu.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN apt-get update && \
qemu-system-s390x \
qemu-system-sparc \
qemu-system-x86 \
qemu-efi-aarch64 \
qemu-utils

RUN mkdir -p /etc/qemu && echo allow all > /etc/qemu/bridge.conf
Expand Down
30 changes: 30 additions & 0 deletions config/runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,33 @@ The selected image must provide the platform's `qemu-system-<arch>` binary
and be accessible to the LAVA worker. This parameter selects the boot
action's container image; it is separate from the job's top-level `image`
setting for its runtime environment.

## ARM64 QEMU ACPI boot

Set `qemu_arm64_acpi: true` in a LAVA job's `params` to boot an existing
ARM64 QEMU platform with UEFI and ACPI:

```yaml
jobs:
baseline-arm64-qualcomm:
template: baseline.jinja2
kind: job
kcidb_test_suite: boot
params:
rootfs_ref: buildroot-baseline
qemu_arm64_acpi: true
```

The flag applies only to platforms with `boot_method: qemu` and `arch: arm64`.
It appends `-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd` to the generated
LAVA context's `extra_options` and adds `acpi=force` to QEMU's kernel command
line. It does not modify the shared platform configuration. Omitted or
false flags preserve the existing boot behavior.

Deploy the updated core templates together with the pipeline configuration.
The QEMU container must contain the firmware at that path; rebuild the image
with the updated QEMU recipe, which installs `qemu-efi-aarch64`, or use a
compatible image via `qemu_docker_image`. The kernel must enable `CONFIG_ACPI`,
`CONFIG_EFI`, and `CONFIG_EFI_STUB`. The pipeline baseline test checks for a
readable `/sys/firmware/acpi/tables/DSDT` when this mode is active, so a boot
without usable ACPI tables does not pass that check.
14 changes: 10 additions & 4 deletions config/runtime/base/lava.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# * timeout
# * modules
# * kernel image name
# * UEFI binaries for QEMU etc.
# * rootfs URL

job_name: "[{{ instanceid|default('KernelCI AKS')}}] {{ node.id }} {{ node.name }} {{ node.data.kernel_revision.describe }}"
Expand All @@ -22,10 +21,17 @@ visibility: public

priority: {{ priority | default('10') }}

{% if platform_config.context or extra_kernel_args %}
{% set qemu_acpi_enabled = (qemu_arm64_acpi | default(false)) and
platform_config.boot_method == 'qemu' and platform_config.arch == 'arm64' %}
{% set lava_context = dict(platform_config.context or {}) %}
{% if qemu_acpi_enabled %}
{% set _ = lava_context.update(extra_options=(lava_context.get('extra_options') or []) +
['-bios', '/usr/share/qemu-efi-aarch64/QEMU_EFI.fd']) %}
{% endif %}
{% if lava_context or extra_kernel_args %}
context:
{% if platform_config.context %}
{% for key, value in platform_config.context.items() %}
{% if lava_context %}
{% for key, value in lava_context.items() %}
{{ key }}: {{ value }}
{% endfor %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion config/runtime/boot/qemu.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
images:
kernel:
image_arg: -kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug
verbose console_msg_format=syslog earlycon"
verbose console_msg_format=syslog earlycon{{ ' acpi=force' if qemu_acpi_enabled else '' }}"
url: '{{ node.artifacts.kernel }}'
ramdisk:
image_arg: -initrd {ramdisk}
Expand Down