public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] svm_set_idt() - don't store/get idt to/from LDT save
@ 2007-01-19 14:49 Leonard Norrgard
  2007-01-23 11:27 ` [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave Uri Lublin
  0 siblings, 1 reply; 2+ messages in thread
From: Leonard Norrgard @ 2007-01-19 14:49 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On AMD processors, executing "shutdown -r now" in a Linux guest actually
reboots the host. While investigating that, I noticed this likely typo.
This patch isn't in itself the complete fix the host reboot, so be
prepared if you test the shutdown command in a Linux guest.

Note: "shutdown -h now" works perfectly and closes the kvm window as
expected.

PS. When I first installed this patch, "shutdown -r now" _didn't_ reboot
the _host_ for about 10 times, instead the guest OOPSed in slightly
different situations. Currently I don't see guest OOPSes, but host reboots.


--- kvm/trunk/kernel/svm.c    2007-01-14 17:29:39.000000000 +0200
+++ kvm-reset/trunk/kernel/svm.c    2007-01-19 15:42:18.000000000 +0200
@@ -680,14 +680,14 @@
 
 static void svm_get_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)
 {
-    dt->limit = vcpu->svm->vmcb->save.ldtr.limit;
-    dt->base = vcpu->svm->vmcb->save.ldtr.base;
+    dt->limit = vcpu->svm->vmcb->save.idtr.limit;
+    dt->base = vcpu->svm->vmcb->save.idtr.base;
 }
 
 static void svm_set_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)
 {
-    vcpu->svm->vmcb->save.ldtr.limit = dt->limit;
-    vcpu->svm->vmcb->save.ldtr.base = dt->base ;
+    vcpu->svm->vmcb->save.idtr.limit = dt->limit;
+    vcpu->svm->vmcb->save.idtr.base = dt->base ;
 }
 
 static void svm_get_gdt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

end of thread, other threads:[~2007-01-23 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-19 14:49 [PATCH] svm_set_idt() - don't store/get idt to/from LDT save Leonard Norrgard
2007-01-23 11:27 ` [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave Uri Lublin

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