Skip to content

Enable KVM by default on Lemans and Monaco Platforms#2251

Merged
Viswanath Kraleti (vkraleti) merged 10 commits into
qualcomm-linux:masterfrom
vkraleti:default-kvm
Jun 5, 2026
Merged

Enable KVM by default on Lemans and Monaco Platforms#2251
Viswanath Kraleti (vkraleti) merged 10 commits into
qualcomm-linux:masterfrom
vkraleti:default-kvm

Conversation

@vkraleti

@vkraleti Viswanath Kraleti (vkraleti) commented May 20, 2026

Copy link
Copy Markdown
Contributor

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.

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.

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.

Do we stand a chance of the firmware reporting the selected xbl_config without requiring a manual intervention from the user side?

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.

Current firmware don't have this support. Need to request boot firmware team for this feature.

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
@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

test-reporting-app Bot commented May 24, 2026

Copy link
Copy Markdown

Test Results

  103 files  ±  0    632 suites   - 1   7h 2m 6s ⏱️ - 1h 57m 39s
  128 tests ±  0    104 ✅ + 20   0 💤 ± 0  24 ❌  - 20 
5 819 runs   - 173  5 655 ✅  - 163  82 💤  - 12  82 ❌ + 2 

For more details on these failures, see this check.

Results for commit c9b9485. ± Comparison against base commit e156427.

This pull request removes 5 and adds 5 tests. Note that renamed tests count towards both.
3_G[ ‑ GStreamer_Video_Decode_h265_480p
lava ‑ auto-login-action
lava ‑ lava-test-retry
lava ‑ lava-test-shell
lava ‑ minimal-boot
lava ‑ 6_OpenCV
lava ‑ 7_irq
lava ‑ download-postprocess-docker
lava ‑ download-retry
lava ‑ downloads

♻️ This comment has been updated with latest results.

@vkraleti

Viswanath Kraleti (vkraleti) commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

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

@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 Viswanath Kraleti (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

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

Enable KVM by default on iq-9075-evk by adding 'kvm' to
MACHINE_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.

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>
KVM is now enabled by default on iq-9075-evk, making the
dedicated KVM build is redundent.

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

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

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>
KVM is now enabled by default on iq-8275-evk, making the
dedicated KVM build is redundent.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Test run workflow

Test jobs for commit f64c896

qcom-distro_linux-qcom-6.18
Pass: 5 | Fail: 2 | Total: 7
qcom-distro
Pass: 7 | Fail: 2 | Total: 9
nodistro
Pass: 7 | Fail: 2 | Total: 9

@ricardosalveti

Copy link
Copy Markdown
Contributor

Viswanath Kraleti (@vkraleti) both monaco and lemans failed to boot on lava.

@vkraleti

Copy link
Copy Markdown
Contributor Author

Viswanath Kraleti (@vkraleti) both monaco and lemans failed to boot on lava.

Without qualcomm-linux/meta-qcom-distro#314, kvm is not present in COMBINED_FEATURES.
As a result, Gunyah XBL config is being flashed, but FIT_DTB_COMPATIBLE has already switched to selecting EL2 DTBOs.
This mismatch causes Monaco and Lemans fail to boot.

To resolve this, we have two options:

  1. Eaither merge Make KVM as a default distro feature meta-qcom-distro#314 so that kvm is included in COMBINED_FEATURES, or
  2. As a temporary workaround, set QCOM_XBL_CONFIG only based on MACHINE_FEATURES.

@ricardosalveti

Copy link
Copy Markdown
Contributor

2. As a temporary workaround, set QCOM_XBL_CONFIG only based on MACHINE_FEATURES.

Yeah, we could do in 2 steps, first as machine features and later as combined, once merged.

Avoid hardcoding XBL configuration logic in image_types_qcom,
which limits flexibility for per-board virtualization control.

Define QCOM_XBL_CONFIG in qcom-common.inc to select the appropriate
XBL config based on MACHINE_FEATURES. This enables consistent KVM
selection while allowing machine-level overrides when required.

Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
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
addition of `kvm` to MACHINE_FEATURES 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>
@vkraleti

Viswanath Kraleti (vkraleti) commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author
  1. As a temporary workaround, set QCOM_XBL_CONFIG only based on MACHINE_FEATURES.

Yeah, we could do in 2 steps, first as machine features and later as combined, once merged.

Thanks for the confirmation. I’ve updated the PR. With this change, all targets should now boot as expected.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Test run workflow

Test jobs for commit c9b9485

qcom-distro_linux-qcom-6.18
Pass: 191 | Fail: 6 | Total: 249
qcom-distro
Pass: 220 | Fail: 7 | Total: 257
nodistro
Pass: 9 | Fail: 0 | Total: 9

Comment thread conf/machine/include/qcom-common.inc
@sbanerjeeqc sbanerjeeqc enabled auto-merge June 5, 2026 04:40
@vkraleti

Copy link
Copy Markdown
Contributor Author

Lava job links for retriggered tests, that failed to start in 1st run due to download timeouts.

Display:
iq-9075-evk - https://lava.infra.foundries.io/scheduler/job/246075 [All PASSED]
rb3gen2-core-kit - https://lava.infra.foundries.io/scheduler/job/246088 [All PASSED]
rb1-core-kit - https://lava.infra.foundries.io/scheduler/job/246092 [All PASSED]

Audio:
rb3gen2-core-kit - https://lava.infra.foundries.io/scheduler/job/246090 [All PASSED]

@vkraleti Viswanath Kraleti (vkraleti) merged commit 4564816 into qualcomm-linux:master Jun 5, 2026
497 of 500 checks passed
@vkraleti Viswanath Kraleti (vkraleti) deleted the default-kvm branch June 5, 2026 06:59
@quic-yocto-ci

Copy link
Copy Markdown
Contributor

Git push to origin failed for wrynose with exitcode 1

@lumag

Copy link
Copy Markdown
Contributor

sbanerjeeqc Viswanath Kraleti (@vkraleti)
The tests are clearly failing for this PR. Why was it merged? Now the tests are failing in the master branch.
cc Ricardo Salveti (@ricardosalveti) Nicolas Dechesne (@ndechesne)

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.

7 participants