Hi Tianrui,

On 5/1/24 08:58, Tianrui Zhao wrote:
Implement loongarch kvm set vcpu interrupt interface,
when a irq is set in vcpu, we use the KVM_INTERRUPT
ioctl to set intr into kvm.

Signed-off-by: Tianrui Zhao <zhaotian...@loongson.cn>
Signed-off-by: xianglai li <lixiang...@loongson.cn>
Reviewed-by: Song Gao <gaos...@loongson.cn>
---
  target/loongarch/cpu.c               | 34 +++++++++++++++++++++-------
  target/loongarch/kvm/kvm.c           | 15 ++++++++++++
  target/loongarch/kvm/kvm_loongarch.h | 16 +++++++++++++
  target/loongarch/trace-events        |  1 +
  4 files changed, 58 insertions(+), 8 deletions(-)
  create mode 100644 target/loongarch/kvm/kvm_loongarch.h

diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 6614a094c8..dfbbe0ace1 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -11,7 +11,6 @@
  #include "qapi/error.h"
  #include "qemu/module.h"
  #include "sysemu/qtest.h"
-#include "exec/cpu_ldst.h"
  #include "exec/exec-all.h"
  #include "cpu.h"
  #include "internals.h"
@@ -20,8 +19,16 @@
  #ifndef CONFIG_USER_ONLY
  #include "sysemu/reset.h"
  #endif
-#include "tcg/tcg.h"
  #include "vec.h"
+#include "sysemu/kvm.h"
+#include "kvm/kvm_loongarch.h"

Shouldn't this header ^ ...

+#ifdef CONFIG_KVM

... goes here?

+#include <linux/kvm.h>
+#endif
+#ifdef CONFIG_TCG
+#include "exec/cpu_ldst.h"
+#include "tcg/tcg.h"
+#endif

Reply via email to