* [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
* Re: [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave
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 ` Uri Lublin
0 siblings, 0 replies; 2+ messages in thread
From: Uri Lublin @ 2007-01-23 11:27 UTC (permalink / raw)
To: Leonard Norrgard; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1.1: Type: text/plain, Size: 1869 bytes --]
I've committed this patch.
In addition to the reboot problem, it fixes savevm/loadvm/migration on AMD machines.
Thanks,
Uri.
-----Original Message-----
From: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org on behalf of Leonard Norrgard
Sent: Fri 19/01/2007 16:49
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [kvm-devel] [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave
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)
[-- Attachment #1.2: Type: text/html, Size: 2801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
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
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ 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