public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] x86: disable virt on kdump and emergency_restart (v3)
@ 2008-11-13 17:43 Eduardo Habkost
  2008-11-13 17:43 ` [PATCH 01/11] kvm: vmx: move cpu_has_kvm_support() to an inline on asm/virtext.h Eduardo Habkost
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Eduardo Habkost @ 2008-11-13 17:43 UTC (permalink / raw)
  To: Avi Kivity, Ingo Molnar
  Cc: Eric W. Biederman, Simon Horman, Andrew Morton, Vivek Goyal,
	Haren Myneni, Andrey Borzenkov, mingo, Rafael J. Wysocki,
	Zachary Amsden, kexec, kvm, linux-kernel, Eduardo Habkost

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.

-- 
Eduardo

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-11-17 15:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13 17:43 [PATCH 00/11] x86: disable virt on kdump and emergency_restart (v3) Eduardo Habkost
2008-11-13 17:43 ` [PATCH 01/11] kvm: vmx: move cpu_has_kvm_support() to an inline on asm/virtext.h Eduardo Habkost
2008-11-13 17:43 ` [PATCH 02/11] kvm: vmx: move ASM_VMX_* definitions to asm/virtext.h Eduardo Habkost
2008-11-13 17:43 ` [PATCH 03/11] x86: asm/virtext.h: add cpu_vmxoff() inline function Eduardo Habkost
2008-11-13 17:43 ` [PATCH 04/11] kvm: vmx: extract kvm_cpu_vmxoff() from hardware_disable() Eduardo Habkost
2008-11-13 17:43 ` [PATCH 05/11] x86: cpu_emergency_vmxoff() function Eduardo Habkost
2008-11-13 17:43 ` [PATCH 06/11] kvm: svm: move some SVM_* #defines to asm/virtext.h Eduardo Habkost
2008-11-13 17:43 ` [PATCH 07/11] kvm: svm: move has_svm() code " Eduardo Habkost
2008-11-13 17:43 ` [PATCH 08/11] kvm: svm: move svm_hardware_disable() " Eduardo Habkost
2008-11-13 17:43 ` [PATCH 09/11] x86: asm/virtext.h: create cpu_emergency_svm_disable() Eduardo Habkost
2008-11-13 17:43 ` [PATCH 10/11] kdump: forcibly disable VMX and SVM on machine_crash_shutdown() Eduardo Habkost
2008-11-13 17:43 ` [PATCH 11/11] x86: disable VMX on all CPUs on reboot Eduardo Habkost
     [not found] ` <1226598231-18311-1-git-send-email-ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-11-16  7:57   ` [PATCH 00/11] x86: disable virt on kdump and emergency_restart (v3) Avi Kivity
     [not found]     ` <491FD283.60402-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-11-17 15:04       ` Eduardo Habkost
2008-11-17 15:12         ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox