diff --git a/kern/ept.c b/kern/ept.c index 83c4e53..57276b6 100644 --- a/kern/ept.c +++ b/kern/ept.c @@ -628,17 +628,6 @@ static inline struct vmx_vcpu *mmu_notifier_to_vmx(struct mmu_notifier *mn) return container_of(mn, struct vmx_vcpu, mmu_notifier); } -static void ept_mmu_notifier_invalidate_page(struct mmu_notifier *mn, - struct mm_struct *mm, - unsigned long address) -{ - struct vmx_vcpu *vcpu = mmu_notifier_to_vmx(mn); - - pr_debug("ept: invalidate_page addr %lx\n", address); - - ept_invalidate_page(vcpu, mm, address); -} - static void ept_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn, struct mm_struct *mm, unsigned long start, @@ -750,7 +739,6 @@ static void ept_mmu_notifier_release(struct mmu_notifier *mn, } static const struct mmu_notifier_ops ept_mmu_notifier_ops = { - .invalidate_page = ept_mmu_notifier_invalidate_page, .invalidate_range_start = ept_mmu_notifier_invalidate_range_start, .invalidate_range_end = ept_mmu_notifier_invalidate_range_end, .clear_flush_young = ept_mmu_notifier_clear_flush_young, diff --git a/kern/vmx.c b/kern/vmx.c index 04c639a..9db954e 100644 --- a/kern/vmx.c +++ b/kern/vmx.c @@ -180,10 +180,7 @@ static inline void ept_sync_context(u64 eptp) static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa) { - if (cpu_has_vmx_invept_individual_addr()) - __invept(VMX_EPT_EXTENT_INDIVIDUAL_ADDR, - eptp, gpa); - else + if (!cpu_has_vmx_invept_individual_addr()) ept_sync_context(eptp); } @@ -510,7 +507,7 @@ static void vmx_setup_constant_host_state(void) vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */ vmcs_writel(HOST_CR4, __read_cr4()); /* 22.2.3, 22.2.5 */ - vmcs_writel(HOST_CR3, read_cr3()); /* 22.2.3 */ + vmcs_writel(HOST_CR3, __read_cr3()); /* 22.2.3 */ vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */ vmcs_write16(HOST_DS_SELECTOR, __KERNEL_DS); /* 22.2.4 */