From: Anthony Liguori <anthony@codemonkey.ws>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [RFC PATCH 00/15] Be able to compile out not needed options
Date: Wed, 24 Jun 2009 13:31:56 -0500 [thread overview]
Message-ID: <4A42711C.2030802@codemonkey.ws> (raw)
In-Reply-To: <m3ljnhebtl.fsf@neno.mitica>
Juan Quintela wrote:
> Anthony Liguori <anthony@codemonkey.ws> wrote:
>
>> quintela@redhat.com wrote:
>>
>>> From: Juan Quintela <quintela@redhat.com>
>>>
>>> Hi
>>>
>>> this series of patches:
>>> a- move object files only used by one target to that target Makefile.target
>>> b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi}
>>> defaults is leave it enabled. You need to add the --disable-* flag to get any change
>>> c- disable the use of --smb <dir>
>>>
>>> What is the intent: we want to be able to not compile-in things that we are not
>>> interested in (they are experimental/not needed for our target/...).
>>>
>>> Is this the right approach? Should I do something different?
>>>
>>> For the next series, I am also interested on enable/disabling bits of a subsysem:
>>> being able to support usb-hid but not usb-{host,net,msnd}. I already have patches
>>> to disable that, just waiting to hear what is the preffered way to get
>>> that functionality.
>>>
>>> Known problems:
>>> - qemu-*.hx files don't run over cpp and then we are not able to remove from
>>> the help page the options that we don't support.
>>> - drive_hot_add without scsi support do nothing.
>>>
>>> Any comments?
>>>
>>>
>> To me, there are a few fundamental requirements for this:
>>
>> 1) This be configurable via a .config file instead of via ./configure
>> options.
>>
>
> We have config-hosts.mak.
>
config-host.mak is generated. We need something that isn't generated.
> If we don't want to do it with ./configure, with what/how do you want it
> to happen.
>
> Do we agree in having:
>
> qemu/.config
> qemu/.config.mak
> target-*/.config
> target-*/.config.mak
>
I don't think we need all of these. I don't think we need separate .mak
and .h files. The later can be generated from the former.
> The problem that I saw otherwise with current approach is that it
> is difficult to have a module linked for one target and not for another.
> (No adding yet more ifdefs tricks is not a solution IMHO).
>
I suspect we will need to restructure Makefile.target to get this
working. I'd suggest focusing on host configuration to start with to
avoid this problem.
>> 2) This involve no additional #ifdefs in the code
>>
>
> That is doable, if we agree that putting stub declarations in .h files
> is ok. I was following the "current style".
>
You usually shouldn't need stubs either. Take for instance, the changes
you make for --disable-bluez.
First, you'll want to move all the stuff in vl.c that's bluez specific
to a separate file.
For usb_device_add, you would need to add a registration API that allows
registering an emulated usb device. In your new file, in a module load
function, you would register bt and the bt: protocol as emulated usb
devices.
Getting the actual bt options is a bit trickier. I think we have to
deal with #ifdefs on that one. We can at least make the bt_parse()
calls part of an option parsing callback or something.
>> The block/ drivers are the model here. If you drop individual files
>> from the build, it Just Works.
>>
>
> But block/ drivers are _easy_ in this regard, you only have to register
> a struct, and they become available. USB/SCSI/... touch code in the
> middle of pc.c and the other platforms "machine" files.
>
Yes, that's precisely what we want to fix :-) block is easy because a
lot of work was put into making it well isolated from everything else.
It's the new model for how the rest of QEMU should look :-)
> On the other hand, block implementation is not flexible enough for us
> yet (TM). We would like to be able to complie all block drivers for
> qemu-img and only some of them for qemu :)
>
That's an interesting idea.
> Will redo the patches with this (and the other people suggestions).
>
> Thank for the input, Juan.
>
Thanks for taking up this effort!
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-06-24 18:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
2009-06-23 15:52 ` malc
2009-06-23 14:14 ` [Qemu-devel] [PATCH 02/15] Make --disable-bluez to really remove bluetooth support quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 03/15] rename usb variable to usb host quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 04/15] protect with CONFIG_BRLAPI quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support quintela
2009-06-23 17:29 ` [Qemu-devel] " Jan Kiszka
2009-06-23 14:14 ` [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support quintela
2009-06-23 17:25 ` [Qemu-devel] " Jan Kiszka
2009-06-23 14:14 ` [Qemu-devel] [PATCH 07/15] add option to remove scsi support quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 08/15] add option to disable wmware devices quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 09/15] ssi bus is only used on the arm platform quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target quintela
2009-06-23 16:20 ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices quintela
2009-06-23 16:19 ` Blue Swirl
2009-06-23 16:27 ` [Qemu-devel] " Juan Quintela
2009-06-23 16:43 ` Blue Swirl
2009-06-23 19:11 ` [Qemu-devel] " Anthony Liguori
2009-06-23 14:14 ` [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it quintela
2009-06-23 16:20 ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets quintela
2009-06-23 16:21 ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc quintela
2009-06-23 16:21 ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 15/15] add option to disable virtio drivers quintela
2009-06-23 19:09 ` [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options Anthony Liguori
2009-06-24 18:17 ` [Qemu-devel] " Juan Quintela
2009-06-24 18:31 ` Anthony Liguori [this message]
2009-06-29 9:45 ` Gerd Hoffmann
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=4A42711C.2030802@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.