|
@@ -4345,7 +4345,6 @@ int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,
|
|
ret = kvm_vcpu_write_guest(vcpu, gpa, val, bytes);
|
|
ret = kvm_vcpu_write_guest(vcpu, gpa, val, bytes);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
return 0;
|
|
return 0;
|
|
- kvm_mmu_pte_write(vcpu, gpa, val, bytes);
|
|
|
|
kvm_page_track_write(vcpu, gpa, val, bytes);
|
|
kvm_page_track_write(vcpu, gpa, val, bytes);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -4604,7 +4603,6 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt,
|
|
return X86EMUL_CMPXCHG_FAILED;
|
|
return X86EMUL_CMPXCHG_FAILED;
|
|
|
|
|
|
kvm_vcpu_mark_page_dirty(vcpu, gpa >> PAGE_SHIFT);
|
|
kvm_vcpu_mark_page_dirty(vcpu, gpa >> PAGE_SHIFT);
|
|
- kvm_mmu_pte_write(vcpu, gpa, new, bytes);
|
|
|
|
kvm_page_track_write(vcpu, gpa, new, bytes);
|
|
kvm_page_track_write(vcpu, gpa, new, bytes);
|
|
|
|
|
|
return X86EMUL_CONTINUE;
|
|
return X86EMUL_CONTINUE;
|
|
@@ -7727,6 +7725,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
|
|
INIT_DELAYED_WORK(&kvm->arch.kvmclock_sync_work, kvmclock_sync_fn);
|
|
INIT_DELAYED_WORK(&kvm->arch.kvmclock_sync_work, kvmclock_sync_fn);
|
|
|
|
|
|
kvm_page_track_init(kvm);
|
|
kvm_page_track_init(kvm);
|
|
|
|
+ kvm_mmu_init_vm(kvm);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -7854,6 +7853,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
|
|
kfree(kvm->arch.vioapic);
|
|
kfree(kvm->arch.vioapic);
|
|
kvm_free_vcpus(kvm);
|
|
kvm_free_vcpus(kvm);
|
|
kfree(rcu_dereference_check(kvm->arch.apic_map, 1));
|
|
kfree(rcu_dereference_check(kvm->arch.apic_map, 1));
|
|
|
|
+ kvm_mmu_uninit_vm(kvm);
|
|
}
|
|
}
|
|
|
|
|
|
void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free,
|
|
void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free,
|