From a9058ecd3cd72634cf548588ce79b3f225c9ca32 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 29 Dec 2006 16:49:37 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/kvm/svm.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/kvm/svm.c') 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) asm volatile ("mov %0, %%dr7" :: "r" (val)); } -static inline int svm_is_long_mode(struct kvm_vcpu *vcpu) -{ - return vcpu->svm->vmcb->save.efer & KVM_EFER_LMA; -} - static inline void force_new_asid(struct kvm_vcpu *vcpu) { vcpu->svm->asid_generation--; @@ -1609,7 +1604,6 @@ static struct kvm_arch_ops svm_arch_ops = { .get_segment_base = svm_get_segment_base, .get_segment = svm_get_segment, .set_segment = svm_set_segment, - .is_long_mode = svm_is_long_mode, .get_cs_db_l_bits = svm_get_cs_db_l_bits, .set_cr0 = svm_set_cr0, .set_cr0_no_modeswitch = svm_set_cr0, -- cgit v1.2.3