* [RFC v3][PATCH 1/2] intel_txt: KVM shutdown fix
@ 2009-05-08 4:49 Joseph Cihula
2009-05-08 7:48 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Cihula @ 2009-05-08 4:49 UTC (permalink / raw)
To: linux-kernel, mingo, arjan, hpa, andi
Cc: chrisw, jmorris, jbeulich, peterm, joseph.cihula, gang.wei,
shane.wang, sheng, avi
Fix KVM to disable itself under all shutdown conditions. In additional to being good practice, Intel(R) TXT requires VMX to be disabled on all CPUs in order for TXT to be disabled.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
---
kvm_main.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- linux-2.6.30-rc4/virt/kvm/kvm_main.c 2009-04-29 21:48:16.000000000 -0700
+++ linux-2.6.30-rc4-lkml/virt/kvm/kvm_main.c 2009-05-07 13:27:03.000000000 -0700
@@ -2112,15 +2112,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_re
static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
void *v)
{
- if (val == SYS_RESTART) {
- /*
- * Some (well, at least mine) BIOSes hang on reboot if
- * in vmx root mode.
- */
- printk(KERN_INFO "kvm: exiting hardware virtualization\n");
- kvm_rebooting = true;
- on_each_cpu(hardware_disable, NULL, 1);
- }
+ /*
+ * Some (well, at least mine) BIOSes hang on reboot if
+ * in vmx root mode.
+ *
+ * And Intel TXT required VMX off for all cpu when system shutdown.
+ */
+ printk(KERN_INFO "kvm: exiting hardware virtualization\n");
+ kvm_rebooting = true;
+ on_each_cpu(hardware_disable, NULL, 1);
return NOTIFY_OK;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RFC v3][PATCH 1/2] intel_txt: KVM shutdown fix
2009-05-08 4:49 [RFC v3][PATCH 1/2] intel_txt: KVM shutdown fix Joseph Cihula
@ 2009-05-08 7:48 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-05-08 7:48 UTC (permalink / raw)
To: joseph.cihula
Cc: linux-kernel, mingo, arjan, hpa, andi, chrisw, jmorris, jbeulich,
peterm, gang.wei, shane.wang, sheng
Joseph Cihula wrote:
> Fix KVM to disable itself under all shutdown conditions. In additional to being good practice, Intel(R) TXT requires VMX to be disabled on all CPUs in order for TXT to be disabled.
>
This is already in kvm.git, as f878b14017f.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-08 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08 4:49 [RFC v3][PATCH 1/2] intel_txt: KVM shutdown fix Joseph Cihula
2009-05-08 7:48 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox