aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2011-11-28 07:42:16 -0500
committerAvi Kivity <avi@redhat.com>2011-12-27 04:22:09 -0500
commite459e3228dc57f7160e564ce0f09edb5bee656d3 (patch)
treeaa3b61d28e69a094f0c7906de40c5fcdca38b3d6 /arch/x86/kvm/x86.c
parent9edb17d55f3ea4943f9654f2aad7a99b4c55840a (diff)
KVM: MMU: move the relevant mmu code to mmu.c
Move the mmu code in kvm_arch_vcpu_init() to kvm_mmu_create() Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 465053151a2..d99976e4451 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3430,12 +3430,7 @@ void kvm_get_segment(struct kvm_vcpu *vcpu,
3430 kvm_x86_ops->get_segment(vcpu, var, seg); 3430 kvm_x86_ops->get_segment(vcpu, var, seg);
3431} 3431}
3432 3432
3433static gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access) 3433gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access)
3434{
3435 return gpa;
3436}
3437
3438static gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access)
3439{ 3434{
3440 gpa_t t_gpa; 3435 gpa_t t_gpa;
3441 struct x86_exception exception; 3436 struct x86_exception exception;
@@ -5915,10 +5910,6 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
5915 kvm = vcpu->kvm; 5910 kvm = vcpu->kvm;
5916 5911
5917 vcpu->arch.emulate_ctxt.ops = &emulate_ops; 5912 vcpu->arch.emulate_ctxt.ops = &emulate_ops;
5918 vcpu->arch.walk_mmu = &vcpu->arch.mmu;
5919 vcpu->arch.mmu.root_hpa = INVALID_PAGE;
5920 vcpu->arch.mmu.translate_gpa = translate_gpa;
5921 vcpu->arch.nested_mmu.translate_gpa = translate_nested_gpa;
5922 if (!irqchip_in_kernel(kvm) || kvm_vcpu_is_bsp(vcpu)) 5913 if (!irqchip_in_kernel(kvm) || kvm_vcpu_is_bsp(vcpu))
5923 vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; 5914 vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
5924 else 5915 else