diff mbox series

[RFC,v2,5/9] target/loongarch: Implement kvm_arch_init function

Message ID 20230427072645.3368102-6-zhaotianrui@loongson.cn (mailing list archive)
State New, archived
Headers show
Series Add loongarch kvm accel support | expand

Commit Message

zhaotianrui April 27, 2023, 7:26 a.m. UTC
Implement the kvm_arch_init of loongarch, in the function, the
KVM_CAP_MP_STATE cap is checked by kvm ioctl.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
---
 target/loongarch/kvm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson May 2, 2023, 11:27 a.m. UTC | #1
On 4/27/23 08:26, Tianrui Zhao wrote:
> Implement the kvm_arch_init of loongarch, in the function, the
> KVM_CAP_MP_STATE cap is checked by kvm ioctl.
> 
> Signed-off-by: Tianrui Zhao<zhaotianrui@loongson.cn>
> ---
>   target/loongarch/kvm.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/loongarch/kvm.c b/target/loongarch/kvm.c
index 50662fd3fb..8dea294930 100644
--- a/target/loongarch/kvm.c
+++ b/target/loongarch/kvm.c
@@ -436,6 +436,7 @@  void kvm_arch_init_irq_routing(KVMState *s)
 
 int kvm_arch_init(MachineState *ms, KVMState *s)
 {
+    cap_has_mp_state = kvm_check_extension(s, KVM_CAP_MP_STATE);
     return 0;
 }