[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class |
Date: |
Thu, 04 Oct 2012 18:00:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 |
Am 04.10.2012 15:50, schrieb Paolo Bonzini:
> Il 04/10/2012 15:46, Anthony Liguori ha scritto:
>>>> +typedef struct PC {
>>>> + DeviceState parent_obj;
>>>> +} PC;
>> So the general problem with this approach is that it strays from
>> modeling hardware.
>
> It doesn't really; it's a motherboard object, there's no reason why
> /machine shouldn't be a Device itself, with a few objects (CPUs, the
> i440FX, the IOAPIC, and of course the peripherals) hanging off it.
On the other hand, why should it? We'd have QEMUMachine::reset vs.
DeviceState::reset then and I don't see an immanent need for gpio / irqs
on the mainboard either (on evaluation boards there are, but they are
usually properties of the SoC modelling-wise).
If we want to bundle objects, we have a dedicated Container type;
otherwise we could just derive from TYPE_OBJECT directly.
In the end it just goes back to our attempt to generalize the properties
mechanisms and/or to a lack of APIs to do exactly what we want... ;)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [RFC v2 00/18] Fix APIC-ID-based CPU topology, Eduardo Habkost, 2012/10/03
- [Qemu-devel] [RFC 09/18] target-i386: cpu: move cpuid_apic_id initialization to cpu_x86_register(), Eduardo Habkost, 2012/10/03
- [Qemu-devel] [RFC 12/18] fw_cfg: remove FW_CFG_MAX_CPUS from fw_cfg_init(), Eduardo Habkost, 2012/10/03
- [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/03
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Paolo Bonzini, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class,
Andreas Färber <=
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Eduardo Habkost, 2012/10/04
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, Anthony Liguori, 2012/10/04