qemu-arm
[Top][All Lists]
Advanced

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

Re: [RFC/PATCH v0 10/12] gunyah: CPU execution loop


From: Philippe Mathieu-Daudé
Subject: Re: [RFC/PATCH v0 10/12] gunyah: CPU execution loop
Date: Thu, 12 Oct 2023 06:43:38 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 11/10/23 18:52, 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_svaddagi@quicinc.com>
---
  accel/gunyah/gunyah-accel-ops.c |   1 +
  accel/gunyah/gunyah-all.c       | 216 ++++++++++++++++++++++++++++++--
  include/hw/core/cpu.h           |   6 +
  include/sysemu/gunyah.h         |   1 +
  include/sysemu/gunyah_int.h     |   3 +
  target/arm/gunyah.c             |  13 ++
  6 files changed, 229 insertions(+), 11 deletions(-)


@@ -110,17 +125,6 @@ int gunyah_create_vm(void)
      return 0;
  }
-void *gunyah_cpu_thread_fn(void *arg)
-{
-    CPUState *cpu = arg;
-
-    do {
-        /* Do nothing */
-    } while (!cpu->unplug || cpu_can_run(cpu));
-
-    return NULL;
-}

This diff could be nicer if you define gunyah_cpu_thread_fn()
in the final place in previous patches, so you don't need to
move it here.

  #define gunyah_slots_lock(s)    qemu_mutex_lock(&s->slots_lock)
  #define gunyah_slots_unlock(s)  qemu_mutex_unlock(&s->slots_lock)

[...]

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index fdcbe87352..b3901e134d 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -240,6 +240,7 @@ typedef struct SavedIOTLB {
struct KVMState;
  struct kvm_run;
+struct gh_vcpu_run;
/* work queue */ @@ -443,6 +444,11 @@ struct CPUState { /* track IOMMUs whose translations we've cached in the TCG TLB */
      GArray *iommu_notifiers;
+
+    struct {
+        int fd;
+        struct gh_vcpu_run *run;
+    } gunyah;

NACK. Please declare as struct AccelCPUState in gunyah_int.h.

  };




reply via email to

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