xen/x86: Don't BUG on CPU0 offlining
Subsystems (2)
PATCH 1/1 xen/x86: Don't BUG on CPU0 offlining
CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.
---
- CPU0 hotplug is currently broken on x86, see
https://lkml.org/lkml/2017/6/26/529
--- arch/x86/xen/time.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/xen/time.c +0 -1
@@ -309,7 +309,6 @@ static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)void xen_teardown_timer (int cpu) {struct clock_event_device *evt; -BUG_ON (cpu ==0 ); evt = &per_cpu (xen_clock_events, cpu).evt;if (evt->irq >=0 ) {
Signature · 1 line
2.9.4
Quoted 6 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.Signed-off-by Vitaly Kuznetsov <[email protected]>
Perhaps:
BUG_ON(cpu == 0 && xen_pv_domain());
?
Quoted 27 lines
---
- CPU0 hotplug is currently broken on x86, see
https://lkml.org/lkml/2017/6/26/529--- arch/x86/xen/time.c | 1 - 1 file changed, 1 deletion(-)arch/x86/xen/time.c +0
-1@@ -309,7 +309,6 @@ static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)void xen_teardown_timer (int cpu) {struct clock_event_device *evt; -BUG_ON (cpu ==0 ); evt = &per_cpu (xen_clock_events, cpu).evt;if (evt->irq >=0 ) {Signature · 7 lines
2.9.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.
Quoted 6 lines
Quoted 1 line
Signed-off-by Vitaly Kuznetsov <[email protected]>Perhaps:
BUG_ON(cpu == 0 && xen_pv_domain());
Linus says no BUG_ONs :-)
xen_pv_cpu_disable() has the following:
if (cpu == 0)
return -EBUSY;as a protection so we won't get to xen_teardown_timer() but if you think additional BUG_ON() protection is justified I'm definitely not against adding it.
Signature · 6 lines
Vitaly _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.
Quoted 6 lines
Quoted 1 line
Signed-off-by Vitaly Kuznetsov <[email protected]>Perhaps:
BUG_ON(cpu == 0 && xen_pv_domain());
Linus says no BUG_ONs :-)
xen_pv_cpu_disable() has the following:
if (cpu == 0)
return -EBUSY;as a protection so we won't get to xen_teardown_timer() but if you think additional BUG_ON() protection is justified I'm definitely not against adding it.
Signature · 1 line
Vitaly
Quoted 17 lines · Vitaly Kuznetsov
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.Quoted 6 lines
Quoted 1 line
Signed-off-by Vitaly Kuznetsov <[email protected]>Perhaps:
BUG_ON(cpu == 0 && xen_pv_domain());Linus says no
BUG_ONs:-)
Quoted 8 lines
xen_pv_cpu_disable()has the following:if (cpu == 0) return -EBUSY;as a protection so we won't get to
xen_teardown_timer()but if you think additionalBUG_ON()protection is justified I'm definitely not against adding it.
No, I don't think its needed. This should be handled at the appropriate level, not down in the timer handling.
So:
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 17 lines · Vitaly Kuznetsov
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.Quoted 6 lines
Quoted 1 line
Signed-off-by Vitaly Kuznetsov <[email protected]>Perhaps:
BUG_ON(cpu == 0 && xen_pv_domain());Linus says no
BUG_ONs:-)
Quoted 8 lines
xen_pv_cpu_disable()has the following:if (cpu == 0) return -EBUSY;as a protection so we won't get to
xen_teardown_timer()but if you think additionalBUG_ON()protection is justified I'm definitely not against adding it.
No, I don't think its needed. This should be handled at the appropriate level, not down in the timer handling.
So:
Juergen
Juergen Gross
maintainerQuoted 6 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.Signed-off-by Vitaly Kuznetsov <[email protected]>
Committed to xen/tip for-linus-4.13
Thanks,
Juergen
Juergen Gross
maintainerQuoted 6 lines · Vitaly Kuznetsov
CONFIG_BOOTPARAM_HOTPLUG_CPU0allows to offline CPU0 but Xen HVM guestsBUG()inxen_teardown_timer(). Remove theBUG_ON(), this is probably a leftover from ancient times when CPU0 hotplug was impossible, it works just fine for HVM.Signed-off-by Vitaly Kuznetsov <[email protected]>
Committed to xen/tip for-linus-4.13
Thanks,
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel