All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
@ 2011-09-21 12:37 stefano.stabellini
  2011-09-21 18:51 ` Konrad Rzeszutek Wilk
  2011-09-22  6:18 ` Olaf Hering
  0 siblings, 2 replies; 10+ messages in thread
From: stefano.stabellini @ 2011-09-21 12:37 UTC (permalink / raw)
  To: konrad.wilk
  Cc: Ian.Campbell, jeremy, xen-devel, Stefano Stabellini, Stefano.Stabellini

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

The xen-platform-pci module is small and for PV on HVM guests is a
requirement for xenbus.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 drivers/xen/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 5f7ff8e..a64b8e8 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -138,9 +138,9 @@ config XEN_GRANT_DEV_ALLOC
 	  or as part of an inter-domain shared memory channel.
 
 config XEN_PLATFORM_PCI
-	tristate "xen platform pci device driver"
+	bool "xen platform pci device driver"
 	depends on XEN_PVHVM && PCI
-	default m
+	default y
 	help
 	  Driver for the Xen PCI Platform device: it is responsible for
 	  initializing xenbus and grant_table when running in a Xen HVM
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 12:37 [PATCH] xen: change XEN_PLATFORM_PCI to bool default y stefano.stabellini
@ 2011-09-21 18:51 ` Konrad Rzeszutek Wilk
  2011-09-21 19:08   ` Ian Campbell
  2011-09-22  6:18 ` Olaf Hering
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-09-21 18:51 UTC (permalink / raw)
  To: stefano.stabellini; +Cc: Ian.Campbell, jeremy, xen-devel

On Wed, Sep 21, 2011 at 01:37:50PM +0100, stefano.stabellini@eu.citrix.com wrote:
> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> The xen-platform-pci module is small and for PV on HVM guests is a

How small? Does it get removed from memory if it never gets loaded?

> requirement for xenbus.

Ok, should it then have a depency on XenBus as well?

Linus does not like the 'default y' very much. He actually dislikes
it quite much as I found when he tore Dan's behind about cleancache.

.. so I think making it 'default n' is a better option or perhaps
making it depend on some other functionality? Or perhaps just remove
the tristate/bool altogether so it gets activated if XEN_PVHVM
is set?

Or remove the XEN_PLATFORM_PCI config option completly and make the
config files that build this driver be CONFIG_XENPVHM dependent?

> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
>  drivers/xen/Kconfig |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 5f7ff8e..a64b8e8 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -138,9 +138,9 @@ config XEN_GRANT_DEV_ALLOC
>  	  or as part of an inter-domain shared memory channel.
>  
>  config XEN_PLATFORM_PCI
> -	tristate "xen platform pci device driver"
> +	bool "xen platform pci device driver"
>  	depends on XEN_PVHVM && PCI
> -	default m
> +	default y
>  	help
>  	  Driver for the Xen PCI Platform device: it is responsible for
>  	  initializing xenbus and grant_table when running in a Xen HVM
> -- 
> 1.7.2.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 18:51 ` Konrad Rzeszutek Wilk
@ 2011-09-21 19:08   ` Ian Campbell
  2011-09-21 21:10     ` Konrad Rzeszutek Wilk
  2011-09-21 22:49     ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 10+ messages in thread
From: Ian Campbell @ 2011-09-21 19:08 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: jeremy, xen-devel, Stefano Stabellini

On Wed, 2011-09-21 at 19:51 +0100, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 21, 2011 at 01:37:50PM +0100, stefano.stabellini@eu.citrix.com wrote:
> > From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > 
> > The xen-platform-pci module is small and for PV on HVM guests is a
> 
> How small?

IIRC it is single digit numbers of kb.

>  Does it get removed from memory if it never gets loaded?
> 
> > requirement for xenbus.
> 
> Ok, should it then have a depency on XenBus as well?

xenbus can't be a module (which is why allowing platform-pci to be is
causing problems).

> Linus does not like the 'default y' very much. He actually dislikes
> it quite much as I found when he tore Dan's behind about cleancache.

In particular case the option is gated on a dependency on another Xen
option (PVHVM) which doesn't default on. But if you do select PVHVM you
certainly want this option, so I think that's ok (why else would
'default y' even exist?)

> .. so I think making it 'default n' is a better option or perhaps
> making it depend on some other functionality? Or perhaps just remove
> the tristate/bool altogether so it gets activated if XEN_PVHVM
> is set?
> 
> Or remove the XEN_PLATFORM_PCI config option completly and make the
> config files that build this driver be CONFIG_XENPVHM dependent?

That would work too. Even better would be to make it an invisible
Kconfig symbol which PVHVM just selects.

Ian.

> 
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > ---
> >  drivers/xen/Kconfig |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> > index 5f7ff8e..a64b8e8 100644
> > --- a/drivers/xen/Kconfig
> > +++ b/drivers/xen/Kconfig
> > @@ -138,9 +138,9 @@ config XEN_GRANT_DEV_ALLOC
> >  	  or as part of an inter-domain shared memory channel.
> >  
> >  config XEN_PLATFORM_PCI
> > -	tristate "xen platform pci device driver"
> > +	bool "xen platform pci device driver"
> >  	depends on XEN_PVHVM && PCI
> > -	default m
> > +	default y
> >  	help
> >  	  Driver for the Xen PCI Platform device: it is responsible for
> >  	  initializing xenbus and grant_table when running in a Xen HVM
> > -- 
> > 1.7.2.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 19:08   ` Ian Campbell
@ 2011-09-21 21:10     ` Konrad Rzeszutek Wilk
  2011-09-22 11:23       ` Stefano Stabellini
  2011-09-21 22:49     ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-09-21 21:10 UTC (permalink / raw)
  To: Ian Campbell; +Cc: jeremy, xen-devel, Stefano Stabellini

On Wed, Sep 21, 2011 at 08:08:15PM +0100, Ian Campbell wrote:
> On Wed, 2011-09-21 at 19:51 +0100, Konrad Rzeszutek Wilk wrote:
> > On Wed, Sep 21, 2011 at 01:37:50PM +0100, stefano.stabellini@eu.citrix.com wrote:
> > > From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > > 
> > > The xen-platform-pci module is small and for PV on HVM guests is a
> > 
> > How small?
> 
> IIRC it is single digit numbers of kb.
> 
> >  Does it get removed from memory if it never gets loaded?
> > 
> > > requirement for xenbus.
> > 
> > Ok, should it then have a depency on XenBus as well?
> 
> xenbus can't be a module (which is why allowing platform-pci to be is
> causing problems).
> 
> > Linus does not like the 'default y' very much. He actually dislikes
> > it quite much as I found when he tore Dan's behind about cleancache.
> 
> In particular case the option is gated on a dependency on another Xen
> option (PVHVM) which doesn't default on. But if you do select PVHVM you
> certainly want this option, so I think that's ok (why else would
> 'default y' even exist?)
> 
> > .. so I think making it 'default n' is a better option or perhaps
> > making it depend on some other functionality? Or perhaps just remove
> > the tristate/bool altogether so it gets activated if XEN_PVHVM
> > is set?
> > 
> > Or remove the XEN_PLATFORM_PCI config option completly and make the
> > config files that build this driver be CONFIG_XENPVHM dependent?
> 
> That would work too. Even better would be to make it an invisible
> Kconfig symbol which PVHVM just selects.
<nods>
Or that since you can't really do PVHVM without the platform PCI driver.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 19:08   ` Ian Campbell
  2011-09-21 21:10     ` Konrad Rzeszutek Wilk
@ 2011-09-21 22:49     ` Jeremy Fitzhardinge
  2011-09-22  6:21       ` Ian Campbell
  1 sibling, 1 reply; 10+ messages in thread
From: Jeremy Fitzhardinge @ 2011-09-21 22:49 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Stefano Stabellini, Konrad Rzeszutek Wilk

On 09/21/2011 12:08 PM, Ian Campbell wrote:
> On Wed, 2011-09-21 at 19:51 +0100, Konrad Rzeszutek Wilk wrote:
>> On Wed, Sep 21, 2011 at 01:37:50PM +0100, stefano.stabellini@eu.citrix.com wrote:
>>> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>
>>> The xen-platform-pci module is small and for PV on HVM guests is a
>> How small?
> IIRC it is single digit numbers of kb.

lsmod shows it's about 2.5k.

>>  Does it get removed from memory if it never gets loaded?

Nope.

>>> requirement for xenbus.
>> Ok, should it then have a depency on XenBus as well?
> xenbus can't be a module (which is why allowing platform-pci to be is
> causing problems).
>
>> Linus does not like the 'default y' very much. He actually dislikes
>> it quite much as I found when he tore Dan's behind about cleancache.
> In particular case the option is gated on a dependency on another Xen
> option (PVHVM) which doesn't default on. But if you do select PVHVM you
> certainly want this option, so I think that's ok (why else would
> 'default y' even exist?)

It was default 'm' before, so making it 'y' is just the logical mapping
of tristate->bool.

>> .. so I think making it 'default n' is a better option or perhaps
>> making it depend on some other functionality? Or perhaps just remove
>> the tristate/bool altogether so it gets activated if XEN_PVHVM
>> is set?
>>
>> Or remove the XEN_PLATFORM_PCI config option completly and make the
>> config files that build this driver be CONFIG_XENPVHM dependent?
> That would work too. Even better would be to make it an invisible
> Kconfig symbol which PVHVM just selects.

Eh, select is pretty nasty.

    J

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 12:37 [PATCH] xen: change XEN_PLATFORM_PCI to bool default y stefano.stabellini
  2011-09-21 18:51 ` Konrad Rzeszutek Wilk
@ 2011-09-22  6:18 ` Olaf Hering
  1 sibling, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2011-09-22  6:18 UTC (permalink / raw)
  To: stefano.stabellini; +Cc: Ian.Campbell, jeremy, xen-devel, konrad.wilk

On Wed, Sep 21, stefano.stabellini@eu.citrix.com wrote:

> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> The xen-platform-pci module is small and for PV on HVM guests is a
> requirement for xenbus.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Because it depends on XEN_PVHVM and XEN_PVHVM usage depends on XEN_PLATFORM_PCI:

Acked-by: Olaf Hering <olaf@aepfle.de>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 22:49     ` Jeremy Fitzhardinge
@ 2011-09-22  6:21       ` Ian Campbell
  2011-09-22 19:35         ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Campbell @ 2011-09-22  6:21 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel, Stefano Stabellini, Konrad Rzeszutek Wilk

On Wed, 2011-09-21 at 23:49 +0100, Jeremy Fitzhardinge wrote:
> > That would work too. Even better would be to make it an invisible
> > Kconfig symbol which PVHVM just selects.
> 
> Eh, select is pretty nasty.

Select of a non user visible symbol is perfectly fine. It's only when
you select something a user can also set that things get nasty.

Ian.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-21 21:10     ` Konrad Rzeszutek Wilk
@ 2011-09-22 11:23       ` Stefano Stabellini
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Stabellini @ 2011-09-22 11:23 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Ian Campbell, jeremy, xen-devel, Stefano Stabellini

On Wed, 21 Sep 2011, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 21, 2011 at 08:08:15PM +0100, Ian Campbell wrote:
> > On Wed, 2011-09-21 at 19:51 +0100, Konrad Rzeszutek Wilk wrote:
> > > On Wed, Sep 21, 2011 at 01:37:50PM +0100, stefano.stabellini@eu.citrix.com wrote:
> > > > From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > > > 
> > > > The xen-platform-pci module is small and for PV on HVM guests is a
> > > 
> > > How small?
> > 
> > IIRC it is single digit numbers of kb.
> > 
> > >  Does it get removed from memory if it never gets loaded?
> > > 
> > > > requirement for xenbus.
> > > 
> > > Ok, should it then have a depency on XenBus as well?
> > 
> > xenbus can't be a module (which is why allowing platform-pci to be is
> > causing problems).
> > 
> > > Linus does not like the 'default y' very much. He actually dislikes
> > > it quite much as I found when he tore Dan's behind about cleancache.
> > 
> > In particular case the option is gated on a dependency on another Xen
> > option (PVHVM) which doesn't default on. But if you do select PVHVM you
> > certainly want this option, so I think that's ok (why else would
> > 'default y' even exist?)
> > 
> > > .. so I think making it 'default n' is a better option or perhaps
> > > making it depend on some other functionality? Or perhaps just remove
> > > the tristate/bool altogether so it gets activated if XEN_PVHVM
> > > is set?
> > > 
> > > Or remove the XEN_PLATFORM_PCI config option completly and make the
> > > config files that build this driver be CONFIG_XENPVHM dependent?
> > 
> > That would work too. Even better would be to make it an invisible
> > Kconfig symbol which PVHVM just selects.
> <nods>
> Or that since you can't really do PVHVM without the platform PCI driver.
> 

Considering that we all agree that XEN_PLATFORM_PCI is needed for PVHVM,
why should we keep around the old XEN_PLATFORM_PCI config option?
I think that Konrad's idea of just using CONFIG_XEN_PVHVM to build
xen-platform-pci.o is the best one.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-22  6:21       ` Ian Campbell
@ 2011-09-22 19:35         ` Jeremy Fitzhardinge
  2011-09-23  6:56           ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Fitzhardinge @ 2011-09-22 19:35 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Stefano Stabellini, Konrad Rzeszutek Wilk

On 09/21/2011 11:21 PM, Ian Campbell wrote:
> On Wed, 2011-09-21 at 23:49 +0100, Jeremy Fitzhardinge wrote:
>>> That would work too. Even better would be to make it an invisible
>>> Kconfig symbol which PVHVM just selects.
>> Eh, select is pretty nasty.
> Select of a non user visible symbol is perfectly fine. It's only when
> you select something a user can also set that things get nasty.

It doesn't matter if its user-visible.  If the selected symbol acquires
other dependencies, the selection won't set them.

    J

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] xen: change XEN_PLATFORM_PCI to bool default y
  2011-09-22 19:35         ` Jeremy Fitzhardinge
@ 2011-09-23  6:56           ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2011-09-23  6:56 UTC (permalink / raw)
  To: Ian Campbell, Jeremy Fitzhardinge
  Cc: xen-devel, Konrad Rzeszutek Wilk, Stefano Stabellini

>>> On 22.09.11 at 21:35, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> On 09/21/2011 11:21 PM, Ian Campbell wrote:
>> On Wed, 2011-09-21 at 23:49 +0100, Jeremy Fitzhardinge wrote:
>>>> That would work too. Even better would be to make it an invisible
>>>> Kconfig symbol which PVHVM just selects.
>>> Eh, select is pretty nasty.
>> Select of a non user visible symbol is perfectly fine. It's only when
>> you select something a user can also set that things get nasty.
> 
> It doesn't matter if its user-visible.  If the selected symbol acquires
> other dependencies, the selection won't set them.

Despite there being numerous contrary examples in the tree: Either one
wants a select-only symbol (then putting dependencies on it is wrong) or
one wants an automatic symbol (then selecting it is very likely wrong).
Which all boils down to the bogus mixing of normal (forward) and reverse
dependencies (using the kconfig source/doc wording).

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-23  6:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 12:37 [PATCH] xen: change XEN_PLATFORM_PCI to bool default y stefano.stabellini
2011-09-21 18:51 ` Konrad Rzeszutek Wilk
2011-09-21 19:08   ` Ian Campbell
2011-09-21 21:10     ` Konrad Rzeszutek Wilk
2011-09-22 11:23       ` Stefano Stabellini
2011-09-21 22:49     ` Jeremy Fitzhardinge
2011-09-22  6:21       ` Ian Campbell
2011-09-22 19:35         ` Jeremy Fitzhardinge
2011-09-23  6:56           ` Jan Beulich
2011-09-22  6:18 ` Olaf Hering

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.