aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/mmu.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2006-12-29 19:49:37 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:44 -0500
commita9058ecd3cd72634cf548588ce79b3f225c9ca32 (patch)
tree11d1edd2dfdcec03ba6b54b3b06d41cae826b940 /drivers/kvm/mmu.c
parent1e885461f02259d75e7480a70d291d2d8aaa938e (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/mmu.c')
-rw-r--r--drivers/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index bdffe83b19e8..85887fcd584f 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -578,7 +578,7 @@ static int init_kvm_mmu(struct kvm_vcpu *vcpu)
578 578
579 if (!is_paging(vcpu)) 579 if (!is_paging(vcpu))
580 return nonpaging_init_context(vcpu); 580 return nonpaging_init_context(vcpu);
581 else if (kvm_arch_ops->is_long_mode(vcpu)) 581 else if (is_long_mode(vcpu))
582 return paging64_init_context(vcpu); 582 return paging64_init_context(vcpu);
583 else if (is_pae(vcpu)) 583 else if (is_pae(vcpu))
584 return paging32E_init_context(vcpu); 584 return paging32E_init_context(vcpu);