[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 03/21] qom: Introduce CPU class
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 03/21] qom: Introduce CPU class |
Date: |
Mon, 06 Feb 2012 21:14:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Am 06.02.2012 20:24, schrieb Anthony Liguori:
> On 02/02/2012 08:59 PM, Andreas Färber wrote:
>> +/**
>> + * cpu_common_reset:
>> + * @cpu: The CPU whose common state is to be reset.
>> + *
>> + * To be used by derived classes.
>> + */
>> +void cpu_common_reset(CPU *cpu);
>
> Make this static, initialize reset = cpu_common_reset in
> cpu_class_initfn, then in the derived class initfn, save the pointer to
> the parent reset function so it can be called later.
I don't see how that would work. To initialize, e.g., the ARMCPUClass
with additional class fields I'm overriding the .class_init. So in order
to let CPUClass initialize the reset callback to its static one I'd need
to make CPU's class_init function non-static so that I can call that
from my derived class' class_init function, no?
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH RFC v3 02/21] qom: Add QOM support to user emulators, (continued)
- [Qemu-devel] [PATCH RFC v3 09/21] target-arm: No longer abort on unhandled CPUIDs on reset, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 06/21] target-arm: Prepare model-specific class_init function, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 04/21] target-arm: Introduce QOM CPU and use it for CPUID lookup, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 17/21] target-arm: Store CLIDR in ARMCPUClass, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 03/21] qom: Introduce CPU class, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 07/21] target-arm: Overwrite reset handler for ti925t, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH v3 01/21] qom: Register QOM infrastructure early, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 19/21] target-arm: Kill off cpu_reset_model_id(), Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 05/21] target-arm: Embed CPUARMState in QOM ARMCPU, Andreas Färber, 2012/02/02
- [Qemu-devel] [PATCH RFC v3 13/21] target-arm: Store JTAG_ID in ARMCPUClass, Andreas Färber, 2012/02/02