qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 7/7] apic: qdev conversion cleanup


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH v2 7/7] apic: qdev conversion cleanup
Date: Wed, 16 Jun 2010 17:26:56 +0000

On Tue, Jun 15, 2010 at 8:17 AM, Markus Armbruster <address@hidden> wrote:
> Blue Swirl <address@hidden> writes:
>
>> On Mon, Jun 14, 2010 at 9:36 AM, Markus Armbruster <address@hidden> wrote:
>>> Blue Swirl <address@hidden> writes:
>>>
>>>> Make APICState completely private to apic.c by using DeviceState
>>>> in external APIs.
>>>
>>> Could you explain why this is an improvement?
>>
>> Outside of apic.c, there is no need to access APICState fields so we
>> can remove that privilege. We can move the device instantiation to the
>> board level where it belongs.
>
> Moving the definition of struct APICState into apic.c is a clear win.
> But what does widening argument types from APICState to DeviceState
> accomplish?  The compiler won't be able to catch certain stupid type
> errors anymore; what do we gain for that loss?

More beautiful architecture. This is how for example Sparc devices
work: there are almost no global functions, all but a few are static.



reply via email to

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