qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Morph cpu_reset -> device_reset


From: Andreas Färber
Subject: Re: [Qemu-devel] Morph cpu_reset -> device_reset
Date: Mon, 15 Jul 2013 11:55:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Hi Peter,

Am 15.07.2013 06:02, schrieb Peter Crosthwaite:
> A while ago, TYPE_CPU was refactored to by a child of TYPE_DEVICE. As
> something of a hangover though, CPU has a separate reset fn to device.
> This means
> 
> device_reset(DEVICE(my_cpu));
> 
> doesn't actually work as a reset. Should we fix this by getting rif of
> cpu_reset and just using the device reset API for cpu reset?

This question has come up a number of times, cf. the archives. For one,
CPU reset is a mess with most CPUs not registering reset handlers of
their own like devices do but having machines do that and piggy-back
some machine-specific initialization, possibly even relying on execution
order of reset handlers. For another, some forms of Soft Reset (e.g.,
kdump on s390x) will require to reset devices only but not CPUs -
currently qdev_devices_reset() calls all reset handlers, not just
devices as the name might imply.

For now you can reset a CPU via

cpu_reset(CPU(my_cpu));

and if you have a good suggestion to clean this up, that will be
appreciated. So far, a CPUClass method (1:1) and Notifiers (1:n) were
the ideas that I brought up.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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