Hi Tianrui, Xianglai,

On 8/11/23 02:41, xianglai li wrote:
From: Tianrui Zhao <zhaotian...@loongson.cn>

Implement kvm_arch_get/set_registers interfaces, many regs
can be get/set in the function, such as core regs, csr regs,
fpu regs, mp state, etc.

Signed-off-by: Tianrui Zhao <zhaotian...@loongson.cn>
Signed-off-by: xianglai li <lixiang...@loongson.cn>
---
  meson.build                   |   1 +
  target/loongarch/cpu.c        |   3 +
  target/loongarch/cpu.h        |   2 +
  target/loongarch/kvm.c        | 580 +++++++++++++++++++++++++++++++++-
  target/loongarch/trace-events |  11 +
  target/loongarch/trace.h      |   1 +
  6 files changed, 596 insertions(+), 2 deletions(-)
  create mode 100644 target/loongarch/trace-events
  create mode 100644 target/loongarch/trace.h


diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index e6a99c83ab..2580dc26e1 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -359,6 +359,7 @@ typedef struct CPUArchState {
      MemoryRegion iocsr_mem;
      bool load_elf;
      uint64_t elf_address;
+    uint32_t mp_state;
      /* Store ipistate to access from this struct */
      DeviceState *ipistate;
  #endif
@@ -477,6 +478,7 @@ static inline void cpu_get_tb_cpu_state(CPULoongArchState 
*env, vaddr *pc,
  }
void loongarch_cpu_list(void);
+void kvm_arch_reset_vcpu(CPULoongArchState *env);

Can we keep the KVM namespace out of generic CPU one?

You add "kvm_loongarch.h" in patch #8 of this series, this seems
a good fit IMHO.

Regards,

Phil.

Reply via email to