[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 06/22] cpu: introduce CPUClass.resume() method |
Date: |
Wed, 10 Apr 2013 14:57:51 +0200 |
On Tue, 09 Apr 2013 13:20:27 +0200
Paolo Bonzini <address@hidden> wrote:
> 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.
Ok, I'll revert it to a way as it was in RFC
http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg03774.html
minus crept in cpu_synchronize_post_init() line.
There is no much use in introducing resume method when there are
only one implementation and stub.
>
> > 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
[Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus, Igor Mammedov, 2013/04/05