qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 4/9] target/loongarch: Implement kvm get/set registers


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v1 4/9] target/loongarch: Implement kvm get/set registers
Date: Wed, 8 Nov 2023 10:48:49 +0100
User-agent: Mozilla Thunderbird

Hi Tianrui, Xianglai,

On 8/11/23 02:41, xianglai li wrote:
From: Tianrui Zhao <zhaotianrui@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 <zhaotianrui@loongson.cn>
Signed-off-by: xianglai li <lixianglai@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

[Prev in Thread] Current Thread [Next in Thread]