You need to sign in or sign up before continuing.
提交 c1a676af 编写于 作者: M Min Fanlei 提交者: guzitao

sw64: kvm: fix wrong info print of KVM_MEMHOTPLUG

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56WV8

--------------------------------

Due to the registration of guest IO address, there is wrong
pr_info of "KVM MEMHOTPLUG support" when booting the guest,
so we fix it.
Signed-off-by: NMin Fanlei <minfanlei@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
上级 0c071b12
...@@ -308,6 +308,12 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, ...@@ -308,6 +308,12 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
if (change == KVM_MR_FLAGS_ONLY || change == KVM_MR_DELETE) if (change == KVM_MR_FLAGS_ONLY || change == KVM_MR_DELETE)
return 0; return 0;
if (test_bit(IO_MARK_BIT, &(mem->guest_phys_addr)))
return 0;
if (test_bit(IO_MARK_BIT + 1, &(mem->guest_phys_addr)))
return 0;
#ifndef CONFIG_KVM_MEMHOTPLUG #ifndef CONFIG_KVM_MEMHOTPLUG
if (mem->guest_phys_addr) { if (mem->guest_phys_addr) {
pr_info("%s, No KVM MEMHOTPLUG support!\n", __func__); pr_info("%s, No KVM MEMHOTPLUG support!\n", __func__);
...@@ -315,12 +321,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, ...@@ -315,12 +321,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
} }
#endif #endif
if (test_bit(IO_MARK_BIT, &(mem->guest_phys_addr)))
return 0;
if (test_bit(IO_MARK_BIT + 1, &(mem->guest_phys_addr)))
return 0;
if (!sw64_kvm_pool) if (!sw64_kvm_pool)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册