Re: [PATCH v1 10/24] kvm: arm64: Extract parts of el2_setup into a macro
From: David Brazdil <hidden>
Date: 2020-11-16 17:56:58
Also in:
kvmarm, lkml
From: David Brazdil <hidden>
Date: 2020-11-16 17:56:58
Also in:
kvmarm, lkml
Hi Marc,
quoted
+ * Check for VHE being present. x2 being non-zero indicates that we + * do have VHE, and that the kernel is intended to run at EL2. */ mrs x2, id_aa64mmfr1_el1 ubfx x2, x2, #ID_AA64MMFR1_VHE_SHIFT, #4 -#else - mov x2, xzr -#endif + cbz x2, el2_setup_nvheWhat initialises x2 to zero when CONFIG_VHE is disabled?
There is no need for x2 anymore, the nVHE code just falls through. Basically: el2_setup: < check CurrentEL > b.eq 1f ret 1: #ifdef CONFIG_VHE < check has VHE > cbz el2_setup_nvhe < VHE setup > ret #endif el2_setup_nvhe: < nVHE setup > eret -David _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel