qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 27/32] arch-specific hooks for accelerator


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH 27/32] arch-specific hooks for accelerator
Date: Thu, 23 Oct 2008 15:47:00 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Jan Kiszka wrote:
     void (*trace_io)(CPUState *env);
     int (*break_loop)(CPUState *env);
     int (*cpu_exec)(CPUState *env);
+    void *arch; /* arch-specific accel functions */
 } QEMUAccel
This is more elegant IMO using container_of() and including the common
part as a member.  Less pointers to chase.

...or to have some kind of QEMUAccel_arch, defined in target-*/accel.h
files. Haven't looked into the use cases yet to say what is sufficient.

You're right, there's no need for run-time dynamic types here.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

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