Skip to contentSkip to conversation

xen/privcmd: make option visible in Kconfig

PATCH In review Thomas Weißschuh 2 participants 3 messages Nov 13, 2021 – Nov 15, 2021 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/privcmd: make option visible in Kconfig

This configuration option provides a misc device as an API to userspace. Make this API usable without having to select the module as a transitive dependency.

This also fixes an issue where localyesconfig would select CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to building as module.

---

Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by XENFS, then the issue can be fixed by removing its "default m" definition.

---
 drivers/xen/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/Kconfig +1 -1
index a1b11c62da9e..c14d8631b8f6 100644
@@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
 	  if guests need generic access to SCSI devices.
 
 config XEN_PRIVCMD
-	tristate
+	tristate "Xen privileged domain-0 commands"
 	depends on XEN
 	default m
 

base-commit: 66f4beaa6c1d28161f534471484b2daa2de1dce0

Signature · 1 line
2.33.1
#1 lore raw
Quoted 24 lines · Thomas Weißschuh

This configuration option provides a misc device as an API to userspace. Make this API usable without having to select the module as a transitive dependency.

This also fixes an issue where localyesconfig would select CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to building as module.

---

Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by XENFS, then the issue can be fixed by removing its "default m" definition.

---
 drivers/xen/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/Kconfig +0 -0
index a1b11c62da9e..c14d8631b8f6 100644

drivers/xen/Kconfig config XEN_SCSI_BACKEND · line 264

Quoted 7 lines
drivers/xen/Kconfig +1 -1
@@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
 	  if guests need generic access to SCSI devices.
 
 config XEN_PRIVCMD
-	tristate
+	tristate "Xen privileged domain-0 commands"
 	depends on XEN
 	default m

While I agree with adding a prompt here, I'm not sure why you've added "domain-0" to its wording. Aiui this interface is equally available in DomU-s, just that they would be able to only (successfully) use a more restricted set of hypercalls. Otherwise the XEN dependency would need to be changed to XEN_DOM0 at the same time as adding a prompt, or the prompt's visibility be restricted to XEN_DOM0.

Jan

#2 lore raw
Quoted 27 lines · Jan Beulich
Quoted 26 lines · Thomas Weißschuh

This configuration option provides a misc device as an API to userspace. Make this API usable without having to select the module as a transitive dependency.

This also fixes an issue where localyesconfig would select CONFIG_XEN_PRIVCMD=m because it was not visible and defaulted to building as module.

---

Note: If CONFIG_XEN_PRIVCMD really is only meant to be selected by XENFS, then the issue can be fixed by removing its "default m" definition.

---
 drivers/xen/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/Kconfig +0 -0
index a1b11c62da9e..c14d8631b8f6 100644
@@ -259,7 +259,7 @@ config XEN_SCSI_BACKEND
 	  if guests need generic access to SCSI devices.
 
Quoted 12 lines

drivers/xen/Kconfig config XEN_SCSI_BACKEND · line 264

Quoted 5 lines
drivers/xen/Kconfig +1 -1
 config XEN_PRIVCMD
-	tristate
+	tristate "Xen privileged domain-0 commands"
 	depends on XEN
 	default m

While I agree with adding a prompt here, I'm not sure why you've added "domain-0" to its wording. Aiui this interface is equally available in DomU-s, just that they would be able to only (successfully) use a more restricted set of hypercalls. Otherwise the XEN dependency would need to be changed to XEN_DOM0 at the same time as adding a prompt, or the prompt's visibility be restricted to XEN_DOM0.

I got it from comment at the top of privcmd.c.

To be honest I have no knowledge about Xen and only submitted this patch to get rid of the spurious module in my localyesconfig.

I can try to find a better wording and submit a v2 but would also be happy if somebody more knowledgeable about this module wrote a patch, which would probably be easiest for everybody.

Thanks,
Thomas