Linux kernel and KVM has supported msgint irqchip, set msgint property
with value ON_OFF_AUTO_AUTO with max CPU type in both KVM and TCG mode.

Signed-off-by: Bibo Mao <[email protected]>
---
 target/loongarch/cpu.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 50fcbabc71..3072ebfd09 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -466,9 +466,8 @@ static void loongarch_max_initfn(Object *obj)
     loongarch_la464_initfn(obj);
 
     cpu->ptw = ON_OFF_AUTO_AUTO;
-    if (kvm_enabled()){
-        cpu->msgint=ON_OFF_AUTO_OFF;
-    }
+    cpu->env.cpucfg[1] = FIELD_DP32(cpu->env.cpucfg[1], CPUCFG1, MSG_INT, 1);
+    cpu->msgint = ON_OFF_AUTO_AUTO;
 
     /* Enable LA v1.1 instructions */
     data = cpu->env.cpucfg[2];
@@ -487,9 +486,6 @@ static void loongarch_max_initfn(Object *obj)
         data = cpu->env.cpucfg[2];
         data = FIELD_DP32(data, CPUCFG2, HPTW, 1);
         cpu->env.cpucfg[2] = data;
-
-        cpu->env.cpucfg[1] = FIELD_DP32(cpu->env.cpucfg[1], CPUCFG1, MSG_INT, 
1);
-        cpu->msgint = ON_OFF_AUTO_AUTO;
     }
 }
 
-- 
2.54.0


Reply via email to