[PATCH OLK-6.6] arm64: Fix guest app segment fault when disable_sdei_nmi_watchdog

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/release-management/issues/IBV2E4 -------------------------------- 1650 XINT hardware feature use 32 bit irq entry to handle IRQs. When disable_sdei_nmi_watchdog is set and the XINT feature is enabled, the hardlockup watchdog will use FEAT_NMI which will be converted to XINT when trapped at EL0, the guest application segment fault occurs. KPTI and spectre_bhb update this_cpu_vector and vbar_el1, but 1650 not enable them, so vbar_el1 will be updated to xint vector "vectors_xcall_xint" when xint enabled, so the host xint has no probelm. When running VM, if a host watchdog NMI inetrrupt the guest, it will restore vbar_el1 with this_cpu_vector of this cpu, which is "vectors", so the NMI will be handled as XINT with 32bit irq entry, which cause guest application segment fault. Update the this_cpu_vector to xint vector to fix it. Fixes: 7f2e02718bba ("arm64: entry: Support hardware xcall and xint") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- arch/arm64/kernel/cpufeature.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index b13858668877..49f047731d71 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2503,6 +2503,7 @@ static void enable_xcall_xint_vectors(void) * the vbar_el1 from the default vectors to the xcall/xint vectors * at once. */ + __this_cpu_write(this_cpu_vector, vectors_xcall_xint); write_sysreg(vectors_xcall_xint, vbar_el1); isb(); } -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17308 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/GRT... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17308 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/GRT...
participants (2)
-
Jinjie Ruan
-
patchwork bot