
virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICUHW4 -------------------------------------------------------------------- In nVHE mode, after hdbss size is configured, the host still reports call trace messages duringlive migration. The modification in this commit ensures that after configuring the hdbss size in nvhe, the host will report nvhe does not support hdbss during live migration. Fixes: bd6106e348d7 ("arm64/kvm: using ioctl to enable/disable the HDBSS feature") Signed-off-by: Jinqian Yang <yangjinqian1@huawei.com> Signed-off-by: Eillon <yezhenyu2@huawei.com> --- arch/arm64/kvm/arm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 4a9cb1d8070a..ce3edd7a50c5 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -144,6 +144,11 @@ static int kvm_cap_arm_enable_hdbss(struct kvm *kvm, return -EINVAL; } + if (!is_kernel_in_hyp_mode()) { + kvm_err("Do not support HDBSS in non-VHE mode!\n"); + return -EINVAL; + } + if (size < 0 || size > HDBSS_MAX_SIZE) { kvm_err("Invalid HDBSS buffer size: %d!\n", size); return -EINVAL; -- 2.33.0