Skip to contentSkip to conversation

xen: change XEN_PLATFORM_PCI to bool default y

PATCH In review [email protected] 6 participants 10 messages Sep 21, 2011 – Sep 23, 2011 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: change XEN_PLATFORM_PCI to bool default y

From: Stefano Stabellini <[email protected]>

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

---
 drivers/xen/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/Kconfig +2 -2
index 5f7ff8e..a64b8e8 100644
@@ -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
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 3 lines · On Wed, Sep 21, 2011 at 01:37:50PM +0100, [email protected]…

From: Stefano Stabellini <[email protected]>

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?

Quoted 1 line

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?

Quoted 24 lines
---
 drivers/xen/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/Kconfig +2 -2
index 5f7ff8e..a64b8e8 100644
@@ -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
Signature · 1 line
1.7.2.3
#2 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · On Wed, Sep 21, 2011 at 01:37:50PM +0100, [email protected]…

From: Stefano Stabellini <[email protected]>

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.

Quoted 5 lines

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

Quoted 1 line

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).

Quoted 2 lines

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?)

Quoted 7 lines

.. 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.

Quoted 25 lines
Quoted 25 lines
---
 drivers/xen/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/xen/Kconfig +2 -2
index 5f7ff8e..a64b8e8 100644
@@ -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
Signature · 1 line
1.7.2.3
#3 lore raw
Quoted 32 lines · Ian Campbell
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · On Wed, Sep 21, 2011 at 01:37:50PM +0100, [email protected]…

From: Stefano Stabellini <[email protected]>

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.

Quoted 5 lines

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

Quoted 1 line

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).

Quoted 2 lines

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?)

Quoted 5 lines

.. 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?

Quoted 5 lines
Quoted 2 lines

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.

#4 lore raw
Quoted 33 lines · Konrad Rzeszutek Wilk
Quoted 32 lines · Ian Campbell
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · On Wed, Sep 21, 2011 at 01:37:50PM +0100, [email protected]…

From: Stefano Stabellini <[email protected]>

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.

Quoted 5 lines

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

Quoted 1 line

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).

Quoted 2 lines

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?)

Quoted 5 lines

.. 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?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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.

#5 lore raw
In reply to Ian Campbell
Quoted 7 lines · Ian Campbell
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · On Wed, Sep 21, 2011 at 01:37:50PM +0100, [email protected]…

From: Stefano Stabellini <[email protected]>

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.

Quoted 1 line
Quoted 1 line

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

Nope.

Quoted 11 lines
Quoted 2 lines
Quoted 1 line

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).

Quoted 2 lines

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.

Quoted 9 lines
Quoted 7 lines

.. 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

#6 lore raw
Quoted 4 lines · Jeremy Fitzhardinge
Quoted 2 lines

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.

#7 lore raw
Quoted 6 lines · Ian Campbell
Quoted 3 lines · Jeremy Fitzhardinge
Quoted 2 lines

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

#8 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Jeremy Fitzhardinge
Quoted 6 lines · Ian Campbell
Quoted 3 lines · Jeremy Fitzhardinge
Quoted 2 lines

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