
From: Zenghui Yu <yuzenghui@huawei.com> euleros inclusion category: feature feature: Hisi non-cacheable snoopy support ------------------------------------------------- Currently we don't expose HiSi CPU type and any hardware capability to guest. Don't try to probe them if we're running in a guest kernel. This is detected by the WARN_ON() when probing CPU type in guest... Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Reviewed-by: Hailiang Zhang <zhang.zhanghailiang@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- virt/kvm/arm/arm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 5611d6c..6d66a8a 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -1676,15 +1676,15 @@ int kvm_arch_init(void *opaque) int ret, cpu; bool in_hyp_mode; - /* Probe the Hisi CPU type */ - probe_hisi_cpu_type(); - probe_hisi_ncsnp_support(); - if (!is_hyp_mode_available()) { kvm_info("HYP mode not available\n"); return -ENODEV; } + /* Probe the Hisi CPU type */ + probe_hisi_cpu_type(); + probe_hisi_ncsnp_support(); + if (!kvm_arch_check_sve_has_vhe()) { kvm_pr_unimpl("SVE system without VHE unsupported. Broken cpu?"); return -ENODEV; -- 1.8.3