mirror of
				https://github.com/momo5502/hypervisor.git
				synced 2025-10-31 02:27:15 +00:00 
			
		
		
		
	Update ia32-doc submodules
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build / Build binaries (debug) (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Build / Build binaries (release) (push) Has been cancelled
				
					
					
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build / Build binaries (debug) (push) Has been cancelled
				Build / Build binaries (release) (push) Has been cancelled
				This commit is contained in:
		| @@ -291,7 +291,7 @@ namespace vmx | ||||
|  | ||||
| 		// -------------------------- | ||||
|  | ||||
| 		epdpte temp_epdpte{}; | ||||
| 		pml1 temp_epdpte{}; | ||||
| 		temp_epdpte.flags = 0; | ||||
| 		temp_epdpte.read_access = 1; | ||||
| 		temp_epdpte.write_access = 1; | ||||
| @@ -306,7 +306,7 @@ namespace vmx | ||||
|  | ||||
| 		// -------------------------- | ||||
|  | ||||
| 		epde_2mb temp_epde{}; | ||||
| 		pml2 temp_epde{}; | ||||
| 		temp_epde.flags = 0; | ||||
| 		temp_epde.read_access = 1; | ||||
| 		temp_epde.write_access = 1; | ||||
| @@ -400,18 +400,18 @@ namespace vmx | ||||
| 		} | ||||
|  | ||||
| 		const auto* pml2 = reinterpret_cast<pml2_ptr*>(pml2_entry); | ||||
| 		auto* pml1 = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE); | ||||
| 		if (!pml1) | ||||
| 		auto* pml1_table = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE); | ||||
| 		if (!pml1_table) | ||||
| 		{ | ||||
| 			pml1 = static_cast<epte*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE)); | ||||
| 			pml1_table = static_cast<pml1*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE)); | ||||
| 		} | ||||
|  | ||||
| 		if (!pml1) | ||||
| 		if (!pml1_table) | ||||
| 		{ | ||||
| 			return nullptr; | ||||
| 		} | ||||
|  | ||||
| 		return &pml1[ADDRMASK_EPT_PML1_INDEX(physical_address)]; | ||||
| 		return &pml1_table[ADDRMASK_EPT_PML1_INDEX(physical_address)]; | ||||
| 	} | ||||
|  | ||||
| 	pml1* ept::find_pml1_table(const uint64_t physical_address) | ||||
| @@ -551,7 +551,7 @@ namespace vmx | ||||
|  | ||||
| 		auto& split = this->allocate_ept_split(); | ||||
|  | ||||
| 		epte pml1_template{}; | ||||
| 		pml1 pml1_template{}; | ||||
| 		pml1_template.flags = 0; | ||||
| 		pml1_template.read_access = 1; | ||||
| 		pml1_template.write_access = 1; | ||||
|   | ||||
| @@ -17,11 +17,11 @@ | ||||
|  | ||||
| namespace vmx | ||||
| { | ||||
| 	using pml4 = ept_pml4; | ||||
| 	using pml3 = epdpte; | ||||
| 	using pml2 = epde_2mb; | ||||
| 	using pml2_ptr = epde; | ||||
| 	using pml1 = epte; | ||||
| 	using pml4 = ept_pml4e; | ||||
| 	using pml3 = ept_pdpte; | ||||
| 	using pml2 = ept_pde_2mb; | ||||
| 	using pml2_ptr = ept_pde; | ||||
| 	using pml1 = ept_pte; | ||||
|  | ||||
| 	using pml4_entry = pml4e_64; | ||||
| 	using pml3_entry = pdpte_64; | ||||
|   | ||||
| @@ -553,7 +553,7 @@ void vmx_enable_syscall_hooks(const bool enable) | ||||
| 	ia32_vmx_entry_ctls_register entry_ctls_register{}; | ||||
|  | ||||
| 	vmx_basic_register.flags = __readmsr(IA32_VMX_BASIC); | ||||
| 	exit_ctls_register.flags = read_vmx(VMCS_CTRL_VMEXIT_CONTROLS); | ||||
| 	exit_ctls_register.flags = read_vmx(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS); | ||||
| 	entry_ctls_register.flags = read_vmx(VMCS_CTRL_VMENTRY_CONTROLS); | ||||
|  | ||||
| 	efer_register.flags = __readmsr(IA32_EFER); | ||||
| @@ -572,7 +572,7 @@ void vmx_enable_syscall_hooks(const bool enable) | ||||
| 		__vmx_vmwrite(VMCS_CTRL_VMENTRY_CONTROLS, adjust_msr(msr, entry_ctls_register.flags)); | ||||
|  | ||||
| 		msr.QuadPart = __readmsr(vmx_basic_register.vmx_controls ? IA32_VMX_TRUE_EXIT_CTLS : IA32_VMX_EXIT_CTLS); | ||||
| 		__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags)); | ||||
| 		__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags)); | ||||
| 	} | ||||
|  | ||||
| 	__vmx_vmwrite(VMCS_GUEST_EFER, efer_register.flags); | ||||
| @@ -996,7 +996,7 @@ void setup_vmcs_for_cpu(vmx::state& vm_state) | ||||
|  | ||||
| 	ia32_vmx_exit_ctls_register exit_ctls_register{}; | ||||
| 	exit_ctls_register.host_address_space_size = 1; | ||||
| 	__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS, | ||||
| 	__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS, | ||||
| 	              adjust_msr(launch_context->msr_data[15], | ||||
| 	                         exit_ctls_register.flags)); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user