quiesce MMU updates and add early EL2 KVM support#61
quiesce MMU updates and add early EL2 KVM support#61aswinm94 wants to merge 2 commits intoqualcomm-linux:qcom-nextfrom
Conversation
aswinm94
commented
May 8, 2026
Flush D-cache and invalidate TLBs around emergency MMU map updates to ensure page table consistency on ARMv8 systems. Introduce Kconfig options for DragonBoard 410c and Qualcomm KVM guest support. Extend early boot code to: - Apply the PSCI workaround for DragonBoard 410c conditionally - Switch hypervisor mode from Gunyah to KVM via TrustZone SMC before EL register setup, allowing U-Boot to run correctly at EL2 in KVM guest environments. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Enable CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK for Qualcomm platforms and explicitly select TARGET_DRAGONBOARD410C in the DragonBoard 410c defconfig. This ensures that the early boot hooks required for PSCI workaround and hypervisor/KVM-related early initialization are enabled and becomes generic for all platforms. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
|
|
||
| flush_dcache_range(gd->arch.tlb_addr, | ||
| gd->arch.tlb_addr + gd->arch.tlb_size); | ||
| __asm_invalidate_tlb_all(); |
There was a problem hiding this comment.
Check if with other MMU fixes if we really need these changes, since CMD-DB and SMEM are now mapped as un-cached regions.
There was a problem hiding this comment.
For boot0 hook updates, please rather pick this patch from upstream related to DB410c hook update here: https://lore.kernel.org/all/20260508-qcom_spl-v6-4-aaac1ab17b50@seznam.cz/, then add the EL2 switch config on top of that.
| mov x9, x0 | ||
|
|
||
| /* | ||
| * Switch to EL2 (exit Gunyah) |
There was a problem hiding this comment.
Here you first need to check if we already entered in EL2 or EL3 then skip this EL2 SMC call switch. IOW, just do the switch when entered in EL1.
| CONFIG_NR_DRAM_BANKS=24 | ||
| CONFIG_DEFAULT_DEVICE_TREE="qcom/sdm845-db845c" | ||
| CONFIG_SYS_LOAD_ADDR=0xA0000000 | ||
| CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y |
There was a problem hiding this comment.
Why do we need to enable this hook support by default? It should be selected by the special config option.
| Support for Qualcomm DragonBoard 410c (APQ8016). | ||
| Enables PSCI workaround for 64-bit mode switching. | ||
|
|
||
| config QCOM_KVM_GUEST_SUPPORT |
There was a problem hiding this comment.
Rather rename this option to: QCOM_EL2_GUNYAH_EXIT_SUPPORT
| /* | ||
| * KVM Guest Support - Hypervisor Switch | ||
| * | ||
| * Configure hypervisor for KVM mode during early boot by switching |
There was a problem hiding this comment.
Don't mention just KVM but other hypervisors can be supported when U-Boot is run in EL2 mode.