From: Tianrui Zhao <[email protected]>

Implement the kvm_arch_init of loongarch, in the function, the
KVM_CAP_MP_STATE cap is checked by kvm ioctl.

Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: "Daniel P. Berrangé" <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: "Philippe Mathieu-Daudé" <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Bibo Mao <[email protected]>
Cc: Song Gao <[email protected]>
Cc: Xiaojuan Yang <[email protected]>
Cc: Tianrui Zhao <[email protected]>

Signed-off-by: Tianrui Zhao <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: xianglai li <[email protected]>
---
 target/loongarch/kvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/loongarch/kvm.c b/target/loongarch/kvm.c
index 8fda80b107..5e3bda444e 100644
--- a/target/loongarch/kvm.c
+++ b/target/loongarch/kvm.c
@@ -491,6 +491,7 @@ int kvm_arch_get_default_type(MachineState *ms)
 
 int kvm_arch_init(MachineState *ms, KVMState *s)
 {
+    cap_has_mp_state = kvm_check_extension(s, KVM_CAP_MP_STATE);
     return 0;
 }
 
-- 
2.39.1


Reply via email to