[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/21] qom: add Device class
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 15/21] qom: add Device class |
Date: |
Wed, 27 Jul 2011 16:10:33 +0100 |
On 25 July 2011 02:44, Anthony Liguori <address@hidden> wrote:
> Device is meant to replace DeviceState as the root class for the device model.
> This is included here merely as a RFC. Device adds a couple of useful
> features.
>
> 1) Default hard reset. Device will literally call finalize on the object and
> then reinitialize it in place. This means that most devices don't have to
> worry about implementing reset logic.
I like having a reset implemented as "just reinstantiate everything", but
this only really covers one of the different reset flavours ("simulation
reset", ie "give me a system in the same state as if I'd just started
qemu from scratch"). I think devices are still going to need to implement
"simulated reset", which is what they do when the core causes a simulated
reset signal to go active (and which ought really to be implemented by
having an incoming gpio signal 'reset'). The two are not always identical,
and you don't necessarily want to reset the whole of the model at once...
(And then some devices have another level of 'soft reset' which you get
by writing to one of its registers.)
...all of which isn't particularly relevant to the object/device model,
but I just wanted to say "reset isn't quite that simple" :-)
-- PMM
- [Qemu-devel] [PATCH 03/21] qom: Add core type system, (continued)
- [Qemu-devel] [PATCH 03/21] qom: Add core type system, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 05/21] plug: add Plug property type, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 10/21] qom: add plug_get QMP command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 11/21] qom: add plug_set QMP command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 08/21] qom: add plug_create QMP command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 13/21] qom: add plug_destroy command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 16/21] qom-devices: add a Pin class, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 17/21] qom: add CharDriver class, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 12/21] qom: add plug_list_props QMP command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 15/21] qom: add Device class, Anthony Liguori, 2011/07/24
- Re: [Qemu-devel] [PATCH 15/21] qom: add Device class,
Peter Maydell <=
- [Qemu-devel] [PATCH 21/21] qom-chrdrv: add UnixServer, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 19/21] qom-chrdrv: add Socket base class, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 18/21] qom-chrdrv: add memory character driver, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 20/21] qom-chrdrv: add TCPServer class, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 14/21] qom: add example qsh command, Anthony Liguori, 2011/07/24
- [Qemu-devel] [PATCH 09/21] qom: add plug_list QMP command, Anthony Liguori, 2011/07/24
- Re: [Qemu-devel] [RFC][PATCH 0/21] QEMU Object Model, Kevin Wolf, 2011/07/25