]> err.no Git - linux-2.6/commitdiff
[PATCH] KVM: SVM: Fix SVM idt confusion
authorLeonard Norrgard <leonard.norrgard@refactor.fi>
Fri, 26 Jan 2007 08:56:38 +0000 (00:56 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 26 Jan 2007 21:50:57 +0000 (13:50 -0800)
There's an obvious typo in svm_{get,set}_idt, causing it to access the ldt
instead.

Because these functions are only called for save/load on AMD, the bug does not
impact normal operation.  With the fix, save/load works as expected on AMD
hosts.

Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/kvm/svm.c

index 7397bfbbcb1cec356bd91826f4455d2728b2b75d..717aabb012cca232d8ddfaf0d7c78e3ad4b97ea4 100644 (file)
@@ -680,14 +680,14 @@ static void svm_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l)
 
 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)