diff options
author | Leonard Norrgard <leonard.norrgard@refactor.fi> | 2007-01-26 03:56:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-26 16:50:57 -0500 |
commit | bce66ca4a2f695509e1b021311eb4de1e4fdf3e4 (patch) | |
tree | 65812b48148006c619289b34f85d131441ff881b /drivers | |
parent | 4b89eed93e0fa40a63e3d7b1796ec1337ea7a3aa (diff) |
[PATCH] KVM: SVM: Fix SVM idt confusion
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/svm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 7397bfbbcb1c..717aabb012cc 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -680,14 +680,14 @@ static void svm_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l) | |||
680 | 680 | ||
681 | static void svm_get_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) | 681 | static void svm_get_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) |
682 | { | 682 | { |
683 | dt->limit = vcpu->svm->vmcb->save.ldtr.limit; | 683 | dt->limit = vcpu->svm->vmcb->save.idtr.limit; |
684 | dt->base = vcpu->svm->vmcb->save.ldtr.base; | 684 | dt->base = vcpu->svm->vmcb->save.idtr.base; |
685 | } | 685 | } |
686 | 686 | ||
687 | static void svm_set_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) | 687 | static void svm_set_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) |
688 | { | 688 | { |
689 | vcpu->svm->vmcb->save.ldtr.limit = dt->limit; | 689 | vcpu->svm->vmcb->save.idtr.limit = dt->limit; |
690 | vcpu->svm->vmcb->save.ldtr.base = dt->base ; | 690 | vcpu->svm->vmcb->save.idtr.base = dt->base ; |
691 | } | 691 | } |
692 | 692 | ||
693 | static void svm_get_gdt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) | 693 | static void svm_get_gdt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) |