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: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 27/32] arch-specific hooks for accelerator
Date: Thu, 23 Oct 2008 15:35:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Avi Kivity wrote:
> 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.

...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.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux




reply via email to

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