qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 7/7] apic: qdev conversion cleanup
Date: Wed, 16 Jun 2010 17:26:56 +0000	[thread overview]
Message-ID: <AANLkTikn6cyhYQAOGkfSfIjKsXwS5-_DUm5uF6eRjUYb@mail.gmail.com> (raw)
In-Reply-To: <m3aaqw6762.fsf@blackfin.pond.sub.org>

On Tue, Jun 15, 2010 at 8:17 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> On Mon, Jun 14, 2010 at 9:36 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>> Blue Swirl <blauwirbel@gmail.com> 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	other threads:[~2010-06-16 17:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12 21:15 [Qemu-devel] [PATCH v2 7/7] apic: qdev conversion cleanup Blue Swirl
2010-06-14  9:36 ` Markus Armbruster
2010-06-14 17:52   ` Blue Swirl
2010-06-15  8:17     ` Markus Armbruster
2010-06-16 17:26       ` Blue Swirl [this message]
2010-06-16 18:19         ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikn6cyhYQAOGkfSfIjKsXwS5-_DUm5uF6eRjUYb@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).