x86: disable virt on kdump and emergency_restart (v3)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | kvm: vmx: move cpu_has_kvm_support() to an inline on asm/virtext.harch/ arch/ | +33 | 0 replies | |
| 2/11 | kvm: vmx: move ASM_VMX_* definitions to asm/virtext.harch/ arch/ | +19 | 0 replies | |
| 3/11 | x86: asm/virtext.h: add cpu_vmxoff() inline functionarch/ | +13 | 0 replies | |
| 4/11 | kvm: vmx: extract kvm_cpu_vmxoff() from hardware_disable()arch/ | +11 | 0 replies | |
| 5/11 | x86: cpu_emergency_vmxoff() functionarch/ | +23 | 0 replies | |
| 6/11 | kvm: svm: move some SVM_* #defines to asm/virtext.harch/ arch/ | +17 | 0 replies | |
| 7/11 | kvm: svm: move has_svm() code to asm/virtext.harch/ arch/ | +38 | 0 replies | |
| 8/11 | kvm: svm: move svm_hardware_disable() code to asm/virtext.harch/ arch/ | +15 | 0 replies | |
| 9/11 | x86: asm/virtext.h: create cpu_emergency_svm_disable()arch/ | +8 | 0 replies | |
| 10/11 | kdump: forcibly disable VMX and SVM on machine_crash_shutdown()arch/ | +18 | 0 replies | |
| 11/11 | x86: disable VMX on all CPUs on rebootarch/ | +61 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] x86: disable virt on kdump and emergency_restart (v3)
Hi,
This is a new spin of the series to disable vmx on kdump and on emergency_restart. Now we avoid doing the function pointer stuff by moving 4 small KVM functions to a header, as inline functions. The code looks much simpler now, but we have to be more careful because some additional code will run on kdump and reboot even when KVM is never loaded.
I haven't tested the SVM changes on AMD CPUs. The changes are really simple, but some testing is welcome.
This series is against tip.git#master, that already contains the nmi_shootdown_cpus() changes I've submitted previously.
*Note: With this series, we will run the NMI stuff only when the CPU where emergency_restart() was called has VMX enabled. This should work on most cases because KVM enables VMX on all CPUs, but we may miss it if we get called during the tiny window where KVM is enabling VMX. Also, I don't know if all code using VMX out there always enable VMX on all CPUs like KVM does.
We have two other alternatives for that:
a) Have an API that all code that enables VMX on any CPU should use to tell the kernel core that it is going to enable VMX on the CPUs.
b) Always call nmi_shootdown_cpus() if the CPU supports VMX. This is a bit intrusive and more risky, as it would unnecessarily run nmi_shootdown_cpus() on emergency_reboot() even on systems where virtualization is never enabled.
Signature · 6 lines
Eduardo _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec