Skip to content

Commit dbc7b54

Browse files
committed
Update ia32-doc submodules
1 parent de99750 commit dbc7b54

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

external/ia32-doc

src/driver/ept.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ namespace vmx
291291

292292
// --------------------------
293293

294-
epdpte temp_epdpte{};
294+
pml1 temp_epdpte{};
295295
temp_epdpte.flags = 0;
296296
temp_epdpte.read_access = 1;
297297
temp_epdpte.write_access = 1;
@@ -306,7 +306,7 @@ namespace vmx
306306

307307
// --------------------------
308308

309-
epde_2mb temp_epde{};
309+
pml2 temp_epde{};
310310
temp_epde.flags = 0;
311311
temp_epde.read_access = 1;
312312
temp_epde.write_access = 1;
@@ -400,18 +400,18 @@ namespace vmx
400400
}
401401

402402
const auto* pml2 = reinterpret_cast<pml2_ptr*>(pml2_entry);
403-
auto* pml1 = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE);
404-
if (!pml1)
403+
auto* pml1_table = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE);
404+
if (!pml1_table)
405405
{
406-
pml1 = static_cast<epte*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE));
406+
pml1_table = static_cast<pml1*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE));
407407
}
408408

409-
if (!pml1)
409+
if (!pml1_table)
410410
{
411411
return nullptr;
412412
}
413413

414-
return &pml1[ADDRMASK_EPT_PML1_INDEX(physical_address)];
414+
return &pml1_table[ADDRMASK_EPT_PML1_INDEX(physical_address)];
415415
}
416416

417417
pml1* ept::find_pml1_table(const uint64_t physical_address)
@@ -551,7 +551,7 @@ namespace vmx
551551

552552
auto& split = this->allocate_ept_split();
553553

554-
epte pml1_template{};
554+
pml1 pml1_template{};
555555
pml1_template.flags = 0;
556556
pml1_template.read_access = 1;
557557
pml1_template.write_access = 1;

src/driver/ept.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
namespace vmx
1919
{
20-
using pml4 = ept_pml4;
21-
using pml3 = epdpte;
22-
using pml2 = epde_2mb;
23-
using pml2_ptr = epde;
24-
using pml1 = epte;
20+
using pml4 = ept_pml4e;
21+
using pml3 = ept_pdpte;
22+
using pml2 = ept_pde_2mb;
23+
using pml2_ptr = ept_pde;
24+
using pml1 = ept_pte;
2525

2626
using pml4_entry = pml4e_64;
2727
using pml3_entry = pdpte_64;

src/driver/hypervisor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ void vmx_enable_syscall_hooks(const bool enable)
553553
ia32_vmx_entry_ctls_register entry_ctls_register{};
554554

555555
vmx_basic_register.flags = __readmsr(IA32_VMX_BASIC);
556-
exit_ctls_register.flags = read_vmx(VMCS_CTRL_VMEXIT_CONTROLS);
556+
exit_ctls_register.flags = read_vmx(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS);
557557
entry_ctls_register.flags = read_vmx(VMCS_CTRL_VMENTRY_CONTROLS);
558558

559559
efer_register.flags = __readmsr(IA32_EFER);
@@ -572,7 +572,7 @@ void vmx_enable_syscall_hooks(const bool enable)
572572
__vmx_vmwrite(VMCS_CTRL_VMENTRY_CONTROLS, adjust_msr(msr, entry_ctls_register.flags));
573573

574574
msr.QuadPart = __readmsr(vmx_basic_register.vmx_controls ? IA32_VMX_TRUE_EXIT_CTLS : IA32_VMX_EXIT_CTLS);
575-
__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags));
575+
__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags));
576576
}
577577

578578
__vmx_vmwrite(VMCS_GUEST_EFER, efer_register.flags);
@@ -996,7 +996,7 @@ void setup_vmcs_for_cpu(vmx::state& vm_state)
996996

997997
ia32_vmx_exit_ctls_register exit_ctls_register{};
998998
exit_ctls_register.host_address_space_size = 1;
999-
__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS,
999+
__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS,
10001000
adjust_msr(launch_context->msr_data[15],
10011001
exit_ctls_register.flags));
10021002

0 commit comments

Comments
 (0)