From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Andrew Jones <drjones@redhat.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"jeremy@goop.org" <jeremy@goop.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>
Subject: Re: [Xen-devel] [PATCH] xen: remove CONFIG_XEN_DOM0 compile option
Date: Mon, 9 Jan 2012 09:56:48 -0500 [thread overview]
Message-ID: <20120109145648.GA25563@phenom.dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1201091054111.3150@kaball-desktop>
On Mon, Jan 09, 2012 at 11:39:44AM +0000, Stefano Stabellini wrote:
> On Mon, 9 Jan 2012, Andrew Jones wrote:
> > ----- Original Message -----
> > > On Fri, 6 Jan 2012, Andrew Jones wrote:
> > > > XEN_DOM0 is a silent option that has been automatically selected
> > > > when
> > > > CONFIG_XEN is selected since 6b0661a5e6fbf. If this option was
> > > > changed
> > > > to a menu configurable option then it would only give users the
> > > > ability
> > > > to compile out about 100 kbytes of code.
> > >
> > > I think that it is less than that because backends are not tied to
> > > dom0
> > > in any way, even though currently they cannot be compiled without
> > > XEN_DOM0.
> > > Running a network or block backend in domU is a well known
> > > configuration.
> > > Therefore the code compiled out only amounts to about 10K.
> > >
> > >
> > > > diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> > > > index 8795480..0725228 100644
> > > > --- a/drivers/xen/Kconfig
> > > > +++ b/drivers/xen/Kconfig
> > > > @@ -78,8 +78,9 @@ config XEN_DEV_EVTCHN
> > > >
> > > > config XEN_BACKEND
> > > > bool "Backend driver support"
> > > > - depends on XEN_DOM0
> > > > default y
> > > > + depends on XEN && PCI_XEN && SWIOTLB_XEN
> > > > + depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI
> > > > help
> > > > Support for backend device drivers that provide I/O services
> > > > to other virtual machines.
> > >
> > > I think we can trimmer the dependency list here: after all backends
> > > can
> > > be run in unpriviledged guests as well (see driver domains).
> > > So I think it should depend only on XEN.
> >
> > Hmm.. Actually, with dependency lists in mind, I think a really messed
> > this patch up. I should have either had CONFIG_XEN inherit these deps,
> > or I should have spread them around to be required at only the specific
> > places they're needed, and then left the stub functions in. Neither of
> > those options seems like a good idea to me. We either force all XEN
> > guests to always have all the deps needed for an initial domain, which
> > is exactly the opposite of the suggestion above (trimming XEN_BACKEND
> > deps for driver domains), or we actually make the code messier and
> > more complicated with more #ifdefs, which are now neatly packaged with
> > XEN_DOM0.
>
> I don't think we should add "PCI_XEN && SWIOTLB_XEN && X86_LOCAL_APIC &&
> X86_IO_APIC && ACPI && PCI" to XEN either.
> However it should be possible to add only the right dependencies to the
> right places.
> In practice it should be sufficient to:
>
> - make PCI_XEN depend on X86_LOCAL_APIC && X86_IO_APIC && ACPI;
Not good. You can make non-ACPI builds with PCI.
.. and you are missing CONFIG_PCI in there.
>
> - make XEN_PCIDEV_FRONTEND and XEN_PCIDEV_BACKEND depend on PCI_XEN;
OK. That sounds good.
>
> - remove the 'ifdef CONFIG_ACPI' from arch/x86/pci/xen.c.
No.. same issue - non-ACPI builds can be with PCI.
>
>
>
> > The driver domain concept may actually be the technical need for
> > making XEN_DOM0 optional. If we want the ability to build a minimally
> > configed XEN kernel to be used as a driver domain, then it doesn't
> > seem like we'd want it to also be capable of running as an initial
> > domain, or to be forced to have all the dependencies and code of an
> > initial domain.
>
> In practice any decent driver domain needs PCI and ACPI support, so
> basically it has the same config requirement of XEN_DOM0. At that point
Sure.. for backends. But for frontends that requirement is not always true.
> we have already discussed that having XEN_DOM0 enabled or disabled
> hardly makes any differences, so we can just get rid of it.
Or in other words, substitute it as CONFIG_PCI_XEN.
But this brings a question about MCE, ACPI cpu freq and ACPI S3.
Those all belong to the dom0 - not to any driver domain. So getting rid
of CONFIG_XEN_DOM0 would present a problem - what would those depend on?
next prev parent reply other threads:[~2012-01-09 14:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 16:39 [PATCH] xen: remove CONFIG_XEN_DOM0 compile option Andrew Jones
2012-01-06 16:59 ` Stefano Stabellini
2012-01-09 10:37 ` [Xen-devel] " Andrew Jones
2012-01-09 11:39 ` Stefano Stabellini
2012-01-09 14:56 ` Konrad Rzeszutek Wilk [this message]
2012-01-09 16:12 ` Stefano Stabellini
2012-01-09 17:04 ` Konrad Rzeszutek Wilk
2012-01-09 17:38 ` Andrew Jones
2012-01-09 18:44 ` Stefano Stabellini
2012-01-10 0:57 ` Jeremy Fitzhardinge
2012-01-11 15:37 ` [Xen-devel] " Andrew Jones
2012-01-11 16:19 ` Konrad Rzeszutek Wilk
2012-01-11 16:36 ` [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin Andrew Jones
2012-01-11 16:36 ` [PATCH 2/4 v2] xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps Andrew Jones
2012-01-11 17:30 ` Konrad Rzeszutek Wilk
2012-01-12 10:59 ` Andrew Jones
2012-01-11 16:36 ` [PATCH 3/4 v2] xen kconfig: add dom0 support help text Andrew Jones
2012-01-11 16:36 ` [PATCH 4/4] xen kconfig: describe xen tmem in the config menu Andrew Jones
2012-01-11 17:35 ` Konrad Rzeszutek Wilk
2012-01-12 10:54 ` Andrew Jones
2012-01-11 17:28 ` [PATCH 1/4] xen kconfig: keep XEN_XENBUS_FRONTEND builtin Konrad Rzeszutek Wilk
2012-01-12 10:49 ` [Xen-devel] " Andrew Jones
2012-01-12 14:37 ` Konrad Rzeszutek Wilk
2012-01-12 15:42 ` Bastian Blank
2012-01-12 17:46 ` [Xen-devel] " Andrew Jones
2012-01-11 17:27 ` [PATCH] xen: remove CONFIG_XEN_DOM0 compile option Konrad Rzeszutek Wilk
2012-01-12 10:53 ` [Xen-devel] " Andrew Jones
2012-01-09 18:12 ` Stefano Stabellini
2012-01-09 17:26 ` Andrew Jones
2012-01-06 17:16 ` Ian Campbell
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=20120109145648.GA25563@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=drjones@redhat.com \
--cc=jeremy@goop.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.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 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).