On 30/7/25 05:01, Bibo Mao wrote:
Move function definition specified with kvm to the corresponding
directory. Also remove header file "cpu.h" including outside of
macro QEMU_KVM_LOONGARCH_H.

Signed-off-by: Bibo Mao <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
---
  hw/loongarch/virt.c                  | 1 +
  target/loongarch/cpu.h               | 9 ---------
  target/loongarch/kvm/kvm_loongarch.h | 4 ++--
  3 files changed, 3 insertions(+), 11 deletions(-)


diff --git a/target/loongarch/kvm/kvm_loongarch.h 
b/target/loongarch/kvm/kvm_loongarch.h
index 1051a341ec..51475675d6 100644
--- a/target/loongarch/kvm/kvm_loongarch.h
+++ b/target/loongarch/kvm/kvm_loongarch.h
@@ -5,11 +5,11 @@
   * Copyright (c) 2023 Loongson Technology Corporation Limited
   */
-#include "cpu.h"
-

Technically we need "target/loongarch/cpu-qom.h" to get
LoongArchCPU's declaration.

  #ifndef QEMU_KVM_LOONGARCH_H
  #define QEMU_KVM_LOONGARCH_H
+void kvm_loongarch_cpu_post_init(LoongArchCPU *cpu);
+void kvm_loongarch_init_irq_routing(void);
  int  kvm_loongarch_set_interrupt(LoongArchCPU *cpu, int irq, int level);
  void kvm_arch_reset_vcpu(CPUState *cs);
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to