qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()
Date: Wed, 03 Oct 2012 16:54:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

Il 03/10/2012 16:53, Eduardo Habkost ha scritto:
>> > 
>> > Can you add a hook to QEMUMachine so that this object is created by
>> > qdev_get_machine() and ends up at /machine?
> Oh, I didn't know there was an existing "machine" object already, I
> didn't know qdev_get_machine().
> 
> Shouldn't /machine be a child of the "container" class?

It should, but note that "container" is really just the same as
TYPE_OBJECT.  It is only for clarity that a difference class is used.
So using TYPE_DEVICE for now is not too bad.

Paolo

> That leads to
> the other question you asked in another message: in this case, PC
> wouldn't be a child of DeviceState, and we would need an additional
> mechanism to allow non-DeviceState objects to use global properties.
> 
> (The sole reason I introduced the PC class was to allow the PC code to
> use the compatibility "contiguous_apic_ids" global property.)




reply via email to

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