qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resetting non-qdev children in a 3-phase reset device


From: Markus Armbruster
Subject: Re: Resetting non-qdev children in a 3-phase reset device
Date: Mon, 26 Apr 2021 07:19:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Peter Maydell <peter.maydell@linaro.org> writes:

> On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> I now understand better the diag288 case, but I still don't understand
>> the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent
>> TYPE_APIC_COMMON register apic_reset_common() but being TYPE_DEVICE it
>> is not on a qbus. It is somehow connected to the X86CPU object, but the
>> single call to apic_init_reset() is from do_cpu_init() - not a reset
>> method -.
>
> pc_machine_reset() calls device_legacy_reset(cpu->apic_state)
> which is to say it invokes the DeviceState::reset method,
> which is either kvm_apic_reset or apic_reset_common.

device_legacy_reset() is deprecated:

    /**
     * device_legacy_reset:
     *
     * Reset a single device (by calling the reset method).
     * Note: This function is deprecated and will be removed when it becomes 
unused.
     * Please use device_cold_reset() now.
     */
    void device_legacy_reset(DeviceState *dev);

Good to know, but how do we get from here to there?  If we could simply
replace one call by the other, surely we'd have done it already.




reply via email to

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