* Philippe Mathieu-Daud? <[email protected]> [2023-10-12 06:43:38]:
> > -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.
Sure.
> > 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.
Ok thanks for that input. Will address it next version.
- vatsa