[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method |
Date: |
Tue, 09 Apr 2013 13:20:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 08/04/2013 22:13, Eduardo Habkost ha scritto:
> So you are initializing a field of CPUClass struct inside a CPU object
> initialization function. And that's a function that is not even
> converted to QOM yet, and buried inside a non-trivial function call tree
> (hence easy to be called at the wrong time if one day we reorder the
> initialization steps).
>
> Can't we do this on class_init(), where it belongs? If we need different
> implementations for softmmu/user, we can add a stub for *-user.
Yes, please add a stub for the new function and override it in cpus.c.
> I think even an explicit #ifdef inside resume_vcpu() would be
> preferable to this.
Using an #ifdef basically means putting it in exec.c. I'm not sure
about that, it seems to fit more in cpus.c.
Paolo
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, (continued)
[Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 13/22] acpi_piix4: add infrastructure to send CPU hot-plug GPE to guest, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 10/22] rtc: update rtc_cmos on CPU hot-plug, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 11/22] cpu: introduce get_firmware_id() method and override it for target-i386, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 17/22] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 16/22] target-i386: cpu: attach ICC bus to CPU on its creation, Igor Mammedov, 2013/04/05