qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jocelyn Mayer <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] How to split vl.h
Date: Wed, 31 Oct 2007 20:35:10 +0100	[thread overview]
Message-ID: <1193859310.24629.112.camel@jma4.dev.netgem.com> (raw)
In-Reply-To: <f43fc5580710311112o456a348foc4528f99aae6c9c@mail.gmail.com>


On Wed, 2007-10-31 at 20:12 +0200, Blue Swirl wrote:
> Hi,

Hi,

> With the automatic dependency rule installed, modifying vl.h causes
> all files to be recompiled. This is of course the correct action, but
> it's a major slowdown for development too.
> 
> How should we split vl.h into smaller pieces? Give each device a
> header file, like m48t59? What about other stuff exported from vl.c?

It seems to me that a lot of things could go back in headers in the hw
subdirectory. A quick and simple approach could be to create a hw/hw.h
file and move everything from vl.h that is only used in the hw
subdirectory. This way, we would break the strong compile-time
dependencies between the hardware library and the rest of the emulation
code.

I think there are some things, like PC serial, USB, ... that could be
left in this kind of header without any issue: they're widely used and
are not likely to change too often.
Some other architecture specific devices would better have their own
header (like the m48t59.h file) or maybe a target dependant header could
be sufficient (quite like the ppc_mac.h I added a few days ago). Having
this kind of header could also be great so we could put the machines
extern definition in it and only include this header file in vl.c (not
vl.h !) to get, for example, the defined machine list for the current
target architecture (and not all possible machines as it is now)...

It also seems that some hardware dependent stuffs are currently
implemented in vl.c, like the bloc devices or USB registration code,
that prevent the related definitions to be isolated in the hw
subdirectory. Splitting vl.c to move those functions into separate
file(s) in hw would allow moving a lot of definitions in the hw
subdirectory. Ideally, vl.c should be hw / target independant and call
the proper routines to do all hardware implementation dependant
initialisations, imho.

Those are just ideas, maybe some are too complicated to be done in a
short timeline; and there may be better solutions... if any other
ideas...

-- 
Jocelyn Mayer <l_indien@magic.fr>

  reply	other threads:[~2007-10-31 19:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31 18:12 [Qemu-devel] How to split vl.h Blue Swirl
2007-10-31 19:35 ` Jocelyn Mayer [this message]
2007-10-31 23:06 ` Thiemo Seufer
2007-11-01 11:16 ` Fabrice Bellard
2007-11-01 13:32   ` Stefan Weil
2007-11-01 14:11     ` andrzej zaborowski
2007-11-04  8:48   ` Blue Swirl
2007-11-04 12:17     ` Paul Brook
2007-11-04 17:23       ` J. Mayer
2007-11-04 17:54         ` Paul Brook
2007-11-04 19:41           ` J. Mayer
2007-11-04 21:30             ` Paul Brook
2007-11-04 23:38               ` Thiemo Seufer
2007-11-04 18:06     ` Thiemo Seufer

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=1193859310.24629.112.camel@jma4.dev.netgem.com \
    --to=l_indien@magic.fr \
    --cc=blauwirbel@gmail.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).