Hi Srivatsa,

On 9/1/24 10:00, Srivatsa Vaddagiri wrote:
Complete the cpu execution loop. At this time, we recognize exits
associated with only MMIO access. Future patches will add support for
recognizing other exit reasons, such as PSCI calls made by guest.

Signed-off-by: Srivatsa Vaddagiri <quic_svadd...@quicinc.com>
---
  accel/gunyah/gunyah-accel-ops.c |   7 ++
  accel/gunyah/gunyah-all.c       | 201 +++++++++++++++++++++++++++++++-
  include/hw/core/cpu.h           |   1 +
  include/sysemu/gunyah_int.h     |   9 ++
  target/arm/gunyah.c             |  13 +++
  5 files changed, 230 insertions(+), 1 deletion(-)


diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 238c02c05e..ef248a658b 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -371,6 +371,7 @@ struct CPUWatchpoint {
struct KVMState;
  struct kvm_run;
+struct gh_vcpu_run;

Please do not forward-declare this structure here, it is not required.

/* work queue */ diff --git a/include/sysemu/gunyah_int.h b/include/sysemu/gunyah_int.h
index dc5b4847a9..72b3027e4e 100644
--- a/include/sysemu/gunyah_int.h
+++ b/include/sysemu/gunyah_int.h
@@ -46,12 +46,21 @@ struct GUNYAHState {
      bool preshmem_reserved;
      uint32_t preshmem_size;
      uint32_t nr_irqs;
+    uint32_t vm_started;
+};
+
+struct AccelCPUState {
+    int fd;
+    struct gh_vcpu_run *run;
  };
int gunyah_create_vm(void);
+void gunyah_start_vm(void);
  int gunyah_vm_ioctl(int type, ...);
  void *gunyah_cpu_thread_fn(void *arg);
  int gunyah_add_irqfd(int irqfd, int label, Error **errp);
  GUNYAHState *get_gunyah_state(void);
+int gunyah_arch_put_registers(CPUState *cs, int level);
+void gunyah_cpu_synchronize_post_reset(CPUState *cpu);
#endif /* GUNYAH_INT_H */


Reply via email to