x86/shim: Make PV_SHIM depend on CPU_ONLINE_OFFLINE
PATCH 1/1 x86/shim: Make PV_SHIM depend on CPU_ONLINE_OFFLINE
PV shim calls cpu_up_helper() and cpu_down_helper() from pv_shim_cpu_{up,down}(). Since commit e8b34da6a098 ("Kconfig: Make cpu hotplug configurable"), these helpers are only built with CONFIG_CPU_ONLINE_OFFLINE. With this option disabled and PV_SHIM enabled the build fails at link time:
shim.c:866: undefined reference to cpu_up_helper' shim.c:899: undefined reference to cpu_down_helper'
Make PV_SHIM depend on CPU_ONLINE_OFFLINE.
---
I found this issue when re-running the failed jobs on a recent Stefano push:
Here, the randconfig job failed:
https://gitlab.com/xen-project/hardware/xen/-/jobs/18591389353
--- xen/arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/Kconfig +1 -1
@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINE help Build Xen with a mode which acts as a shim to allow PV guest to run in an HVM/PVH container. This mode can only be enabled with command
Signature · 1 line
2.43.0
Quoted 26 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>---
I found this issue when re-running the failed jobs on a recent Stefano push:
Here, the randconfig job failed:
https://gitlab.com/xen-project/hardware/xen/-/jobs/18591389353--- xen/arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/x86/Kconfig +0
-0
xen/arch/x86/Kconfig config PVH_GUEST · line 297
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINE help Build Xen with a mode which acts as a shim to allow PV guest to run in an HVM/PVH container. This mode can only be enabled with command
Thanks for catching this.
Quoted 6 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:
Quoted 7 lines
shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>
I was tempted to give this an ack right away, but then I wondered:
xen/arch/x86/Kconfig config PVH_GUEST · line 294
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINE
Might this not better be a select in this particular case?
Jan
Quoted 17 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:Quoted 7 lines
shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>I was tempted to give this an ack right away, but then I wondered:
Quoted 10 lines
xen/arch/x86/Kconfig config PVH_GUEST · line 294
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINEMight this not better be a select in this particular case?
It's up to you. I can do either way because I don't have any preference here.
~Michal
Quoted 28 lines · Michal
Quoted 17 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:Quoted 7 lines
shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>I was tempted to give this an ack right away, but then I wondered:
Quoted 10 lines
xen/arch/x86/Kconfig config PVH_GUEST · line 294
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINEMight this not better be a select in this particular case?
Quoted 1 line
It's up to you. I can do either way because I don't have any preference here.
To a person configuring Xen (for purely-shim, or for with-shim) it may not be obvious that this extra setting needs enabling manually. Hence why I think "select" would be better here. (I'm inclined to say that the same may, perhaps to a lesser degree, also be true for PV and XEN_GUEST.) Let's see if other x86 maintainers have a different view (without waiting for too long).
Jan
Quoted 30 lines · Michal
Quoted 17 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:Quoted 7 lines
shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>I was tempted to give this an ack right away, but then I wondered:
Quoted 10 lines
xen/arch/x86/Kconfig config PVH_GUEST · line 294
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINEMight this not better be a select in this particular case?
Quoted 1 line
It's up to you. I can do either way because I don't have any preference here.
I would go with select, so that a user doesn't have to enable CPU_ONLINE_OFFLINE to see PV_SHIM. It's a non-trivial connection to make.
Thanks, Roger.
Jan Beulich
Acked-byQuoted 29 lines · Roger Pau Monné
Quoted 28 lines · Michal
Quoted 27 lines · Jan Beulich
Quoted 6 lines · Michal Orzel
PV shim calls
cpu_up_helper()andcpu_down_helper()from pv_shim_cpu_{up,down}(). Since commite8b34da6a098("Kconfig: Make cpu hotplug configurable"), these helpers are only built withCONFIG_CPU_ONLINE_OFFLINE. With this option disabled andPV_SHIMenabled the build fails at link time:Quoted 7 lines
shim.c:866: undefined reference to
cpu_up_helper' shim.c:899: undefined reference tocpu_down_helper'Make
PV_SHIMdepend onCPU_ONLINE_OFFLINE.Fixes e8b34da6a098 ("Kconfig: Make cpu hotplug configurable")Signed-off-by Michal Orzel <[email protected]>I was tempted to give this an ack right away, but then I wondered:
xen/arch/x86/Kconfig config PVH_GUEST · line 294
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -291,7 +291,7 @@ config PVH_GUEST config PV_SHIM def_bool y prompt "PV Shim" - depends on PV && XEN_GUEST + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINEMight this not better be a select in this particular case?
Quoted 5 lines
Quoted 1 line
It's up to you. I can do either way because I don't have any preference here.
I would go with select, so that a user doesn't have to enable
CPU_ONLINE_OFFLINEto seePV_SHIM. It's a non-trivial connection to make.
And with the adjustment (no need to re-submit):
Jan