コード例 #1
0
ファイル: svm_init.c プロジェクト: imgits/rkanalyzer
void
svm_vminit (void)
{
	current->u.svm.np = NULL;
	svm_vmcb_init ();
	/* svm_msr_init (); */
	if (current->u.svm.vi.vmcb->np_enable)
		svm_np_init ();
	else
		cpu_mmu_spt_init ();
	call_initfunc ("vcpu");
}
コード例 #2
0
ファイル: vt_paging.c プロジェクト: matsu/bitvisor
void
vt_paging_init (void)
{
	if (current->u.vt.ept_available &&
	    current->u.vt.unrestricted_guest_available)
		current->u.vt.unrestricted_guest = true;
	else
		cpu_mmu_spt_init ();
	if (current->u.vt.unrestricted_guest &&
	    current->u.vt.pcid_available) {
		/* The spt implementation does not support PCID yet.
		 * PCID could be enabled if EPT and PCID are
		 * available, because PCID can only be enabled on
		 * 64bit mode that is unrelated to unrestricted guest,
		 * but to avoid complexity, provide PCID only if EPT,
		 * unrestricted guest and PCID are supported. */
		current->cpuid.pcid = true;
		if (current->u.vt.enable_invpcid_available)
			current->cpuid.invpcid = true;
	}
	if (current->u.vt.ept_available)
		vt_ept_init ();
	vt_paging_pg_change ();
}