Skip to content

x86: disable virt on kdump and emergency_restart (v2)

Eduardo Habkost kexec kvm linux-acpi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15x86 kdump: Extract kdump-specific code from crash_nmi_callback()arch/x86/kernel/crash.c+20 -110 replies
2/15x86 kdump: Move crashing_cpu assignment to nmi_shootdown_cpus()arch/x86/kernel/crash.c+5 -30 replies
3/15x86 kdump: Create kdump_nmi_shootdown_cpus()arch/x86/kernel/crash.c+9 -20 replies
4/15x86 kdump: Make kdump_nmi_callback() a function ptr on crash_nmi_callback()arch/x86/kernel/crash.c+8 -30 replies
5/15x86 kdump: Make nmi_shootdown_cpus() non-staticarch/x86/include/asm/reboot.h arch/x86/kernel/crash.c+6 -20 replies
6/15x86: Move nmi_shootdown_cpus() to reboot.carch/x86/kernel/crash.c arch/x86/kernel/reboot.c+79 -730 replies
7/15x86: Make nmi_shootdown_cpus() available on !SMP and !X86_LOCAL_APICarch/x86/kernel/reboot.c+12 -10 replies
8/15x86: Disable IRQs before doing anything on nmi_shootdown_cpus()arch/x86/kernel/reboot.c+1 -00 replies
9/15x86: Emergency virtualization disable functionarch/x86/include/asm/virtext.h arch/x86/kernel/Makefile arch/x86/kernel/virtext.c +1 more+124 -03 replies
10/15kdump: Hook emergency_virt_disable() on crash shutdown codearch/x86/kernel/crash.c+13 -00 replies
11/15x86: disable virtualization on all CPUs if needed, on emergency_restartarch/x86/kernel/reboot.c+53 -20 replies
12/15kvm: svm: no-parameters version of svm_hardware_disable()arch/x86/kvm/svm.c+6 -10 replies
13/15kvm: svm: register virt_disable function on hardware_setuparch/x86/kvm/svm.c+15 -40 replies
14/15kvm: vmx: crash_hardware_disable functionarch/x86/kvm/vmx.c+35 -50 replies
15/15Revert "x86: default to reboot via ACPI"arch/x86/kernel/reboot.c+1 -515 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchAndrey BorzenkovAvi Kivity
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15Bisected-by A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/15] x86: disable virt on kdump and emergency_restart (v2)

Hi,

This is an updated version of the reboot/kdump virtualization disable series that I've sent previously.

In short, the x86 and kdump changes are the same as before, except for EXPORT_SYMBOL_GPL, and the KVM parts are completely different.

Details of changes since the previous series:

- Style fixes suggested by checkpatch
- Added local_irq_disable() to nmi_shootdown_cpus() (patch 08)
- Use EXPORT_SYMBOL_GPL() on set_virt_disable_func() & clear_virt_disable_func()
- Add comments to source code on places where emergency_virt_disable() is called, explaining why.
- kvm: Move the set_virt_disable_func() call to vmx.c and svm.c. This made the patch series shorter and removing one level of abstraction.

This series is against linux-next-20081105.

Patches 01-07 simply move the non-kdump-specific parts
of nmi_shootdown_cpus() to reboot.c, so it can be used by emergency_restart(). They should be a no-op in relation to existing code.

Patch 08 adds an additional local_irq_disable() to nmi_shootdown_cpus(), in case it is called with IRQs enabled.

Patch 09 adds the virt_disable function registering interface, like the previous series.

Patch 10 hooks emergency_virt_disable() into kdump crash_shutdown code.

Patch 11 hooks emergency_virt_disable() into emergency_restart() using nmi_shootdown_cpus().

Patches 12-14 change KVM so that it registers a virt_disable function when loading.

Finally, patch 15 restore the previous reboot=kbd default.

Signature · 1 line
Eduardo