|
| From: | Avi Kivity |
| Subject: | [Qemu-devel] Re: [PATCH 27/32] arch-specific hooks for accelerator |
| Date: | Thu, 23 Oct 2008 15:30:42 +0200 |
| User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Glauber Costa wrote:
This patch provides an arch field in QEMUAccel. It will
be used initially for x86, to replace kqemu code in op_helper.c
We start with get_msr and set_msr functions, that allow accelerators
to handle non-default msrs.
@@ -23,6 +23,7 @@ typedef struct QEMUAccel {
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.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
| [Prev in Thread] | Current Thread | [Next in Thread] |