Skip to content

Enable KVM by default on Lemans and Monaco Platforms#2251

Open
vkraleti wants to merge 11 commits into
qualcomm-linux:masterfrom
vkraleti:default-kvm
Open

Enable KVM by default on Lemans and Monaco Platforms#2251
vkraleti wants to merge 11 commits into
qualcomm-linux:masterfrom
vkraleti:default-kvm

Conversation

@vkraleti
Copy link
Copy Markdown
Contributor

@vkraleti vkraleti commented May 20, 2026

All PILs are functioning correctly and KVM can be enabled by default on Lemans and Monaco platforms.
Update FIT_DTB_COMPATIBLE entries and machine configurations to switch to default KVM for these boards.

FIT_DTB_COMPATIBLE[qcs8300-ride+qcs8300-ride-camx+monaco-el2+monaco-camx-el2] = "qcom,qcs8300-adp-camx-el2kvm"
FIT_DTB_COMPATIBLE[qcs8300-ride+qcs8300-ride-camx+monaco-el2+monaco-camx-el2+monaco-staging] = "qcom,qcs8300-adp-camx-el2kvm-staging"
FIT_DTB_COMPATIBLE[qcs9100-ride] = " \
FIT_DTB_COMPATIBLE[qcs9100-ride+lemans-el2] = " \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is lemans-el2 available on linux-yocto?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lemans-el2.dtbo is available from 'v7.0-rc1' onwards. I'll backport the change as a .patch to linux-yocto.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Supporting EL2 is not just the DT, it might require driver changes, etc.
We should have all the mechanisms to have DTs supported by qcom-6.18 / qcom-next but not by linux-yocto.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a kernel build perspective, meta-qcom already supports selecting DTB/DTBOs per kernel. However, the FIT_DTB_COMPATIBLE mapping is common for all. Should we now consider splitting FIT_DTB_COMPATIBLE per kernel? Without doing so, we will not be able to map different DTB/DTBO sets to the same compatible string.

Alternatively, we may need to introduce a new substring, say 'gunyah' so that only the base DTB can selected, without the EL2 DTBO.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FIT_DTB_COMPATIBLE should remain common. In the end, the list of the DTBs for each feature should not depend on the kernel version. The list of DTBs available, might, but it's already handled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be set by the UEFI or by the user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By user. KVM or Gunyah usage is not defined in the hardware metadata. So UEFI can't handle it at this point.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user selects el2gh while we flashed xbl_config_kvm?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can happen even with current implementation. This PR's goal is to switch the default from Gunyah to KVM. IMO, mismatch b/w DTBO and xbl_config needs a separate discussion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user selects el2gh while we flashed xbl_config_kvm?

We tried on hamoa, if we don't use uefi_dtbs_kvm.xz and el2 dtbo together, there will be bootup issue.

Comment thread ci/iq-9075-evk.yml Outdated
Comment thread conf/machine/include/fit-dtb-compatible.inc Outdated
Comment thread conf/machine/iq-9075-evk.conf
Comment thread conf/machine/include/fit-dtb-compatible.inc Outdated
@vkraleti vkraleti marked this pull request as ready for review May 24, 2026 14:34
@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit 01b1d38

qcom-distro
Pass: 263 | Fail: 3 | Total: 289
nodistro
Pass: 9 | Fail: 0 | Total: 9
qcom-distro_linux-qcom-6.18
Pass: 197 | Fail: 9 | Total: 231

@test-reporting-app
Copy link
Copy Markdown

test-reporting-app Bot commented May 24, 2026

Test Results

 25 files   -    78   25 suites   - 607   55m 45s ⏱️ - 4h 2m 25s
 13 tests  -   115   10 ✅  -    92  0 💤 ± 0  3 ❌  - 23 
187 runs   - 5 821  178 ✅  - 5 745  0 💤  - 51  9 ❌  - 25 

For more details on these failures, see this check.

Results for commit c58dd22. ± Comparison against base commit 5716703.

This pull request removes 115 tests.
0_AudioRecord_Config01 ‑ AudioRecord_Config01
0_BT_FW_KMD_Service ‑ BT_FW_KMD_Service
0_GStreamer_Video_Encode_h264_480p ‑ GStreamer_Video_Encode_h264_480p
0_Libcamera_cam ‑ Libcamera_cam
0_Weston_Runtime_Preflight ‑ Weston_Runtime_Preflight
0_hotplug ‑ hotplug
10_AudioRecord ‑ AudioRecord
10_Kubernetes_Kernel_Config ‑ Kubernetes_Kernel_Config
11_DSP_AudioPD ‑ DSP_AudioPD
11_Ethernet ‑ Ethernet
…

♻️ This comment has been updated with latest results.

@vkraleti
Copy link
Copy Markdown
Contributor Author

vkraleti commented May 25, 2026

Using MACHINE_FEATURES for to KVM enablement is now part of #2289. This PR only focuses switching Lemans platforms to default KVM.

@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit c58dd22

qcom-distro
Pass: 8 | Fail: 1 | Total: 9
nodistro
Pass: 8 | Fail: 1 | Total: 9
qcom-distro_linux-qcom-6.18
Pass: 6 | Fail: 1 | Total: 7

@lumag
Copy link
Copy Markdown
Contributor

lumag commented May 26, 2026

Why is this separate from #2289 ?

@vkraleti
Copy link
Copy Markdown
Contributor Author

Why is this separate from #2289 ?

Just to simplify reviews. Felt, switching 'kvm' to MACHINE_FEAUTRES and making 'kvm' default on Lemans are independent tasks.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented May 26, 2026

Why is this separate from #2289 ?

Just to simplify reviews. Felt, switching 'kvm' to MACHINE_FEAUTRES and making 'kvm' default on Lemans are independent tasks.

And of course it was described in the PR desription. Was it not?

@vkraleti
Copy link
Copy Markdown
Contributor Author

Do you want me to add changes from #2289 also here?

@bhargav0610
Copy link
Copy Markdown

bootup failure on Rb8 https://lava.infra.foundries.io/scheduler/job/231031
[RM]Error: unexpected value in image ELF ehdr
Static VM not in READY state
GearVM not started

@vkraleti
Copy link
Copy Markdown
Contributor Author

bootup failure on Rb8 https://lava.infra.foundries.io/scheduler/job/231031 [RM]Error: unexpected value in image ELF ehdr Static VM not in READY state GearVM not started

Thanks for proactively checking. This PR is dependent on #2289 for picking correct XBL config. Please wait till final reviews before reporting further failures.

@vkraleti vkraleti changed the title RFC: Enable KVM by default on Lemans Platforms RFC: Enable KVM by default on Lemans and Monaco Platforms May 27, 2026
@lumag
Copy link
Copy Markdown
Contributor

lumag commented May 28, 2026

bootup failure on Rb8 https://lava.infra.foundries.io/scheduler/job/231031 [RM]Error: unexpected value in image ELF ehdr Static VM not in READY state GearVM not started

Thanks for proactively checking. This PR is dependent on #2289 for picking correct XBL config. Please wait till final reviews before reporting further failures.

Again, how does one guess that, if you don't write it in the PR description?

@vkraleti
Copy link
Copy Markdown
Contributor Author

bootup failure on Rb8 https://lava.infra.foundries.io/scheduler/job/231031 [RM]Error: unexpected value in image ELF ehdr Static VM not in READY state GearVM not started

Thanks for proactively checking. This PR is dependent on #2289 for picking correct XBL config. Please wait till final reviews before reporting further failures.

Again, how does one guess that, if you don't write it in the PR description?

This is RFC draft PR to seek inputs on default KVM enablement. I wasn't really expecting test teams monitoring it. There is even a comment saying the PR is broken into two.

@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit 14107c6

qcom-distro_linux-qcom-6.18
Pass: 206 | Fail: 6 | Total: 249
qcom-distro
Pass: 249 | Fail: 11 | Total: 291
nodistro
Pass: 8 | Fail: 1 | Total: 9

@vkraleti vkraleti changed the title RFC: Enable KVM by default on Lemans and Monaco Platforms Enable KVM by default on Lemans and Monaco Platforms May 29, 2026
@vkraleti vkraleti force-pushed the default-kvm branch 2 times, most recently from 10d16af to 8b9c962 Compare May 30, 2026 10:10
vkraleti added 11 commits May 30, 2026 23:02
…BL selection

Avoid hardcoding XBL configuration selection in image_types_qcom
bbclass, which limits flexibility to enable KVM selectively
across boards.

Define QCOM_XBL_CONFIG in machine configuration files to select
the appropriate XBL config based on `kvm` in COMBINED_FEATURES. This
enables per-board control of XBL configuration selection.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
…stro-kvm

Adjust CI to handle removal of qcom-distro-kvm configuration
in meta-qcom-distro, where KVM is now enabled by default.

Replace usage of the qcom-distro-kvm distro with explicit
MACHINE_FEATURES and DISTRO_FEATURES additions to retain
KVM-enabled builds during the transition.

This is a temporary workaround until CI fully adopts the new
KVM-by-default model.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Enable KVM by default on iq-9075-evk by adding 'kvm' to
MACHINE_FEATURES.

Update QCOM_XBL_CONFIG to use the KVM XBL config by default
and select Gunyah one when enabled via DISTRO_FEATURES.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Enable KVM by default on qcs9100-ride-sx by adding 'kvm' to
MACHINE_FEATURES.

Update QCOM_XBL_CONFIG to use the KVM XBL config by default
and select Gunyah when enabled via DISTRO_FEATURES.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Enable KVM by default on iq-8275-evk by adding 'kvm' to
MACHINE_FEATURES.

Update QCOM_XBL_CONFIG to use the KVM XBL config by default
and select Gunyah when enabled via DISTRO_FEATURES.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Enable KVM by default on iq-8275-evk by adding 'kvm' to
MACHINE_FEATURES.

Update QCOM_XBL_CONFIG to use the KVM XBL config by default
and select Gunyah when enabled via DISTRO_FEATURES.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
For linux-qcom kernels update FIT_DTB_COMPATIBLE entries of Lemans
platforms to use lemans-el2.dtbo by default, enabling KVM.

Replace el2kvm-specific compatible strings with default variants
to align with the KVM-by-default behavior. Update non-EL2 entries
to use `el2gh` substring in compatible strings, indicating mapping
to the Gunyah hypervisor.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Update FIT_DTB_COMPATIBLE entries for Monaco platforms to use
monaco-el2.dtbo by default, enabling KVM configurations.

Replace el2kvm-specific compatible strings with default variants
to align with the KVM-by-default behavior. Update non-EL2 entries
to use `el2gh` substring in compatible strings, indicating mapping
to the Gunyah hypervisor.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Add ci/qcom-distro-gunyah.yml KAS fragment to build with
'gunyah' in DISTRO_FEATURES.

This enables composing builds that run without KVM support.

Example:
  kas build ci/iq-9075-evk.yml:ci/qcom-distro-gunyah.yml

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Replace the iq-9075-evk KVM configuration in the CI build
matrix with a Gunyah-based variant.

KVM is now enabled by default on iq-9075-evk, making the
dedicated KVM build is redundent. Replacing it with a Gunyah
configuration ensures that non-KVM virtualization paths are
still validated in CI.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Replace the iq-8275-evk KVM configuration in the CI build
matrix with a Gunyah-based variant.

KVM is now enabled by default on iq-8275-evk, making the
dedicated KVM build is redundent. Replacing it with a Gunyah
configuration ensures that non-KVM virtualization paths are
still validated in CI.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants