Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions kern/ept.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions kern/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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 */
Expand Down