diff options
author | Avi Kivity <avi@qumranet.com> | 2006-12-29 19:49:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-30 13:56:44 -0500 |
commit | a9058ecd3cd72634cf548588ce79b3f225c9ca32 (patch) | |
tree | 11d1edd2dfdcec03ba6b54b3b06d41cae826b940 /drivers/kvm/svm.c | |
parent | 1e885461f02259d75e7480a70d291d2d8aaa938e (diff) |
[PATCH] KVM: Simplify is_long_mode()
Instead of doing tricky stuff with the arch dependent virtualization
registers, take a peek at the guest's efer.
This simlifies some code, and fixes some confusion in the mmu branch.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 283024ab3ba0..68124c0bf630 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -166,11 +166,6 @@ static inline void write_dr7(unsigned long val) | |||
166 | asm volatile ("mov %0, %%dr7" :: "r" (val)); | 166 | asm volatile ("mov %0, %%dr7" :: "r" (val)); |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline int svm_is_long_mode(struct kvm_vcpu *vcpu) | ||
170 | { | ||
171 | return vcpu->svm->vmcb->save.efer & KVM_EFER_LMA; | ||
172 | } | ||
173 | |||
174 | static inline void force_new_asid(struct kvm_vcpu *vcpu) | 169 | static inline void force_new_asid(struct kvm_vcpu *vcpu) |
175 | { | 170 | { |
176 | vcpu->svm->asid_generation--; | 171 | vcpu->svm->asid_generation--; |
@@ -1609,7 +1604,6 @@ static struct kvm_arch_ops svm_arch_ops = { | |||
1609 | .get_segment_base = svm_get_segment_base, | 1604 | .get_segment_base = svm_get_segment_base, |
1610 | .get_segment = svm_get_segment, | 1605 | .get_segment = svm_get_segment, |
1611 | .set_segment = svm_set_segment, | 1606 | .set_segment = svm_set_segment, |
1612 | .is_long_mode = svm_is_long_mode, | ||
1613 | .get_cs_db_l_bits = svm_get_cs_db_l_bits, | 1607 | .get_cs_db_l_bits = svm_get_cs_db_l_bits, |
1614 | .set_cr0 = svm_set_cr0, | 1608 | .set_cr0 = svm_set_cr0, |
1615 | .set_cr0_no_modeswitch = svm_set_cr0, | 1609 | .set_cr0_no_modeswitch = svm_set_cr0, |