HyperDbg Debugger
Loading...
Searching...
No Matches
ManageRegs.c File Reference

Manage Registers. More...

#include "pch.h"

Functions

VOID SetGuestCsSel (PVMX_SEGMENT_SELECTOR Cs)
 Set just the Guest Cs selector.
 
VOID SetGuestCs (PVMX_SEGMENT_SELECTOR Cs)
 Set the Guest Cs.
 
VMX_SEGMENT_SELECTOR GetGuestCs ()
 Get the Guest Cs Selector.
 
VOID SetGuestSsSel (PVMX_SEGMENT_SELECTOR Ss)
 Set just the Guest Ss selector.
 
VOID SetGuestSs (PVMX_SEGMENT_SELECTOR Ss)
 Set the Guest Ss selector.
 
VMX_SEGMENT_SELECTOR GetGuestSs ()
 Get the Guest Ss Selector.
 
VOID SetGuestDsSel (PVMX_SEGMENT_SELECTOR Ds)
 Set just the Guest Ds selector.
 
VOID SetGuestDs (PVMX_SEGMENT_SELECTOR Ds)
 Set the Guest Ds selector.
 
VMX_SEGMENT_SELECTOR GetGuestDs ()
 Get the Guest Ds Selector.
 
VOID SetGuestFsSel (PVMX_SEGMENT_SELECTOR Fs)
 Set just the Guest Fs selector.
 
VOID SetGuestFs (PVMX_SEGMENT_SELECTOR Fs)
 Set the Guest Fs selector.
 
VMX_SEGMENT_SELECTOR GetGuestFs ()
 Get the Guest Fs Selector.
 
VOID SetGuestGsSel (PVMX_SEGMENT_SELECTOR Gs)
 Set just the Guest Gs selector.
 
VOID SetGuestGs (PVMX_SEGMENT_SELECTOR Gs)
 Set the Guest Gs selector.
 
VMX_SEGMENT_SELECTOR GetGuestGs ()
 Get the Guest Gs Selector.
 
VOID SetGuestEsSel (PVMX_SEGMENT_SELECTOR Es)
 Set just the Guest Es selector.
 
VOID SetGuestEs (PVMX_SEGMENT_SELECTOR Es)
 Set the Guest Es selector.
 
VMX_SEGMENT_SELECTOR GetGuestEs ()
 Get the Guest Es Selector.
 
VOID SetGuestIdtr (UINT64 Idtr)
 Set the Guest Idtr.
 
UINT64 GetGuestIdtr ()
 Get the Guest Idtr.
 
VOID SetGuestLdtr (UINT64 Ldtr)
 Set the Guest Ldtr.
 
UINT64 GetGuestLdtr ()
 Get the Guest Ldtr.
 
VOID SetGuestGdtr (UINT64 Gdtr)
 Set the Guest Gdtr.
 
UINT64 GetGuestGdtr ()
 Get the Guest Gdtr.
 
VOID SetGuestTr (UINT64 Tr)
 
UINT64 GetGuestTr ()
 Get the Guest Tr.
 
VOID SetGuestRFlags (UINT64 RFlags)
 Set the Guest RFLAGS Register.
 
UINT64 GetGuestRFlags ()
 Get the Guest Rflags value.
 
VOID SetGuestRIP (UINT64 RIP)
 Set the Guest RIP Register.
 
VOID SetGuestRSP (UINT64 RSP)
 Set the Guest RSP Register.
 
UINT64 GetGuestRIP ()
 Get the Guest RIP value.
 
UINT64 GetGuestCr0 ()
 Get the Guest Cr0 value.
 
UINT64 GetGuestCr2 ()
 Get the Guest Cr2 value.
 
UINT64 GetGuestCr3 ()
 Get the Guest Cr3 value.
 
UINT64 GetGuestCr4 ()
 Get the Guest Cr4 value.
 
UINT64 GetGuestCr8 ()
 Get the Guest Cr8 value.
 
VOID SetGuestCr0 (UINT64 Cr0)
 Set the Guest Cr0 Register.
 
VOID SetGuestCr2 (UINT64 Cr2)
 Set the Guest Cr2 Register.
 
VOID SetGuestCr3 (UINT64 Cr3)
 Set the Guest Cr3 Register.
 
VOID SetGuestCr4 (UINT64 Cr4)
 Set the Guest Cr4 Register.
 
VOID SetGuestCr8 (UINT64 Cr8)
 Set the Guest Cr8 Register.
 
VOID SetGuestDr0 (UINT64 value)
 Set the Guest Dr0 Register.
 
VOID SetGuestDr1 (UINT64 value)
 Set the Guest Dr1 Register.
 
VOID SetGuestDr2 (UINT64 value)
 Set the Guest Dr2 Register.
 
VOID SetGuestDr3 (UINT64 value)
 Set the Guest Dr3 Register.
 
VOID SetGuestDr6 (UINT64 value)
 Set the Guest Dr6 Register.
 
VOID SetGuestDr7 (UINT64 value)
 Set the Guest Dr7 Register.
 
UINT64 GetGuestDr0 ()
 Get the Guest Dr0 value.
 
UINT64 GetGuestDr1 ()
 Get the Guest Dr1 value.
 
UINT64 GetGuestDr2 ()
 Get the Guest Dr2 value.
 
UINT64 GetGuestDr3 ()
 Get the Guest Dr3 value.
 
UINT64 GetGuestDr6 ()
 Get the Guest Dr6 (breakpoint status) value.
 
UINT64 GetGuestDr7 ()
 Get the Guest Dr7 (breakpoint trigger) value.
 

Detailed Description

Manage Registers.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Alee Amini (alee@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-06-11

Function Documentation

◆ GetGuestCr0()

UINT64 GetGuestCr0 ( )

Get the Guest Cr0 value.

Returns
UINT64
461{
462 UINT64 Cr0;
463
464 __vmx_vmread(VMCS_GUEST_CR0, &Cr0);
465 return Cr0;
466}
unsigned __int64 UINT64
Definition BasicTypes.h:21

◆ GetGuestCr2()

UINT64 GetGuestCr2 ( )

Get the Guest Cr2 value.

Returns
UINT64
475{
476 UINT64 Cr2;
477
478 Cr2 = __readcr2();
479 return Cr2;
480}

◆ GetGuestCr3()

UINT64 GetGuestCr3 ( )

Get the Guest Cr3 value.

Returns
UINT64
489{
490 UINT64 Cr3;
491
492 __vmx_vmread(VMCS_GUEST_CR3, &Cr3);
493 return Cr3;
494}

◆ GetGuestCr4()

UINT64 GetGuestCr4 ( )

Get the Guest Cr4 value.

Returns
UINT64
503{
504 UINT64 Cr4;
505
506 __vmx_vmread(VMCS_GUEST_CR4, &Cr4);
507 return Cr4;
508}

◆ GetGuestCr8()

UINT64 GetGuestCr8 ( )

Get the Guest Cr8 value.

Returns
UINT64
517{
518 UINT64 Cr8;
519
520 Cr8 = __readcr8();
521 return Cr8;
522}

◆ GetGuestCs()

VMX_SEGMENT_SELECTOR GetGuestCs ( )

Get the Guest Cs Selector.

Returns
SEGMENT_SELECTOR
50{
52
53 __vmx_vmread(VMCS_GUEST_CS_BASE, &Cs.Base);
54 VmxVmread32P(VMCS_GUEST_CS_LIMIT, &Cs.Limit);
55 VmxVmread32P(VMCS_GUEST_CS_ACCESS_RIGHTS, &Cs.Attributes.AsUInt);
56 VmxVmread16P(VMCS_GUEST_CS_SELECTOR, &Cs.Selector);
57
58 return Cs;
59}
UCHAR VmxVmread16P(size_t Field, UINT16 *FieldValue)
VMX VMREAD instruction (16-bit)
Definition Vmx.c:104
UCHAR VmxVmread32P(size_t Field, UINT32 *FieldValue)
VMX VMREAD instruction (32-bit)
Definition Vmx.c:86
Segment selector.
Definition DataTypes.h:436
UINT32 Limit
Definition DataTypes.h:439
VMX_SEGMENT_ACCESS_RIGHTS_TYPE Attributes
Definition DataTypes.h:438
UINT16 Selector
Definition DataTypes.h:437
UINT64 Base
Definition DataTypes.h:440
UINT32 AsUInt
Definition DataTypes.h:428

◆ GetGuestDr0()

UINT64 GetGuestDr0 ( )

Get the Guest Dr0 value.

Returns
UINT64
663{
664 UINT64 Dr0 = 0;
665 Dr0 = __readdr(0);
666 return Dr0;
667}

◆ GetGuestDr1()

UINT64 GetGuestDr1 ( )

Get the Guest Dr1 value.

Returns
UINT64
676{
677 UINT64 Dr1 = 0;
678 Dr1 = __readdr(1);
679 return Dr1;
680}

◆ GetGuestDr2()

UINT64 GetGuestDr2 ( )

Get the Guest Dr2 value.

Returns
UINT64
689{
690 UINT64 Dr2 = 0;
691 Dr2 = __readdr(2);
692 return Dr2;
693}

◆ GetGuestDr3()

UINT64 GetGuestDr3 ( )

Get the Guest Dr3 value.

Returns
UINT64
702{
703 UINT64 Dr3 = 0;
704 Dr3 = __readdr(3);
705 return Dr3;
706}

◆ GetGuestDr6()

UINT64 GetGuestDr6 ( )

Get the Guest Dr6 (breakpoint status) value.

Returns
UINT64
715{
716 UINT64 Dr6 = 0;
717 Dr6 = __readdr(6);
718 return Dr6;
719}

◆ GetGuestDr7()

UINT64 GetGuestDr7 ( )

Get the Guest Dr7 (breakpoint trigger) value.

Returns
UINT64
728{
729 UINT64 Dr7 = 0;
730 Dr7 = __readdr(7);
731 return Dr7;
732}

◆ GetGuestDs()

VMX_SEGMENT_SELECTOR GetGuestDs ( )

Get the Guest Ds Selector.

Returns
SEGMENT_SELECTOR
140{
142
143 __vmx_vmread(VMCS_GUEST_DS_BASE, &Ds.Base);
144 VmxVmread32P(VMCS_GUEST_DS_LIMIT, &Ds.Limit);
145 VmxVmread32P(VMCS_GUEST_DS_ACCESS_RIGHTS, &Ds.Attributes.AsUInt);
146 VmxVmread16P(VMCS_GUEST_DS_SELECTOR, &Ds.Selector);
147
148 return Ds;
149}

◆ GetGuestEs()

VMX_SEGMENT_SELECTOR GetGuestEs ( )

Get the Guest Es Selector.

Returns
SEGMENT_SELECTOR
275{
277
278 __vmx_vmread(VMCS_GUEST_ES_BASE, &Es.Base);
279 VmxVmread32P(VMCS_GUEST_ES_LIMIT, &Es.Limit);
280 VmxVmread32P(VMCS_GUEST_ES_ACCESS_RIGHTS, &Es.Attributes.AsUInt);
281 VmxVmread16P(VMCS_GUEST_ES_SELECTOR, &Es.Selector);
282
283 return Es;
284}

◆ GetGuestFs()

VMX_SEGMENT_SELECTOR GetGuestFs ( )

Get the Guest Fs Selector.

Returns
SEGMENT_SELECTOR
185{
187
188 __vmx_vmread(VMCS_GUEST_FS_BASE, &Fs.Base);
189 VmxVmread32P(VMCS_GUEST_FS_LIMIT, &Fs.Limit);
190 VmxVmread32P(VMCS_GUEST_FS_ACCESS_RIGHTS, &Fs.Attributes.AsUInt);
191 VmxVmread16P(VMCS_GUEST_FS_SELECTOR, &Fs.Selector);
192
193 return Fs;
194}

◆ GetGuestGdtr()

UINT64 GetGuestGdtr ( )

Get the Guest Gdtr.

Returns
UINT64
359{
360 UINT64 Gdtr;
361
362 __vmx_vmread(VMCS_GUEST_GDTR_BASE, &Gdtr);
363
364 return Gdtr;
365}

◆ GetGuestGs()

VMX_SEGMENT_SELECTOR GetGuestGs ( )

Get the Guest Gs Selector.

Returns
SEGMENT_SELECTOR
230{
232
233 __vmx_vmread(VMCS_GUEST_GS_BASE, &Gs.Base);
234 VmxVmread32P(VMCS_GUEST_GS_LIMIT, &Gs.Limit);
235 VmxVmread32P(VMCS_GUEST_GS_ACCESS_RIGHTS, &Gs.Attributes.AsUInt);
236 VmxVmread16P(VMCS_GUEST_GS_SELECTOR, &Gs.Selector);
237
238 return Gs;
239}

◆ GetGuestIdtr()

UINT64 GetGuestIdtr ( )

Get the Guest Idtr.

Returns
UINT64
305{
306 UINT64 Idtr;
307
308 __vmx_vmread(VMCS_GUEST_IDTR_BASE, &Idtr);
309
310 return Idtr;
311}

◆ GetGuestLdtr()

UINT64 GetGuestLdtr ( )

Get the Guest Ldtr.

Returns
UINT64
332{
333 UINT64 Ldtr;
334
335 __vmx_vmread(VMCS_GUEST_LDTR_BASE, &Ldtr);
336
337 return Ldtr;
338}

◆ GetGuestRFlags()

UINT64 GetGuestRFlags ( )

Get the Guest Rflags value.

Returns
UINT64
410{
411 UINT64 RFlags;
412 __vmx_vmread(VMCS_GUEST_RFLAGS, &RFlags);
413 return RFlags;
414}

◆ GetGuestRIP()

UINT64 GetGuestRIP ( )

Get the Guest RIP value.

Returns
UINT64
447{
448 UINT64 RIP;
449
450 __vmx_vmread(VMCS_GUEST_RIP, &RIP);
451 return RIP;
452}

◆ GetGuestSs()

VMX_SEGMENT_SELECTOR GetGuestSs ( )

Get the Guest Ss Selector.

Returns
SEGMENT_SELECTOR
95{
97
98 __vmx_vmread(VMCS_GUEST_SS_BASE, &Ss.Base);
99 VmxVmread32P(VMCS_GUEST_SS_LIMIT, &Ss.Limit);
100 VmxVmread32P(VMCS_GUEST_SS_ACCESS_RIGHTS, &Ss.Attributes.AsUInt);
101 VmxVmread16P(VMCS_GUEST_SS_SELECTOR, &Ss.Selector);
102
103 return Ss;
104}

◆ GetGuestTr()

UINT64 GetGuestTr ( )

Get the Guest Tr.

Returns
UINT64
384{
385 UINT64 Tr;
386
387 __vmx_vmread(VMCS_GUEST_TR_BASE, &Tr);
388
389 return Tr;
390}

◆ SetGuestCr0()

VOID SetGuestCr0 ( UINT64 Cr0)

Set the Guest Cr0 Register.

Parameters
Cr0The Cr0 Value for the guest
Returns
VOID
532{
533 VmxVmwrite64(VMCS_GUEST_CR0, Cr0);
534}
UCHAR VmxVmwrite64(size_t Field, UINT64 FieldValue)
VMX VMWRITE instruction (64-bit)
Definition Vmx.c:122

◆ SetGuestCr2()

VOID SetGuestCr2 ( UINT64 Cr2)

Set the Guest Cr2 Register.

Parameters
Cr2The Cr2 Value for the guest
Returns
VOID
544{
545 __writecr2(Cr2);
546}

◆ SetGuestCr3()

VOID SetGuestCr3 ( UINT64 Cr3)

Set the Guest Cr3 Register.

Parameters
Cr3The Cr3 Value for the guest
Returns
VOID
556{
557 VmxVmwrite64(VMCS_GUEST_CR3, Cr3);
558}

◆ SetGuestCr4()

VOID SetGuestCr4 ( UINT64 Cr4)

Set the Guest Cr4 Register.

Parameters
Cr4The Cr4 Value for the guest
Returns
VOID
568{
569 VmxVmwrite64(VMCS_GUEST_CR4, Cr4);
570}

◆ SetGuestCr8()

VOID SetGuestCr8 ( UINT64 Cr8)

Set the Guest Cr8 Register.

Parameters
Cr8The Cr8 Value for the guest
Returns
VOID
580{
581 __writecr8(Cr8);
582}

◆ SetGuestCs()

VOID SetGuestCs ( PVMX_SEGMENT_SELECTOR Cs)

Set the Guest Cs.

Parameters
CsThe CS Selector for the guest
Returns
VOID
36{
37 __vmx_vmwrite(VMCS_GUEST_CS_BASE, Cs->Base);
38 __vmx_vmwrite(VMCS_GUEST_CS_LIMIT, Cs->Limit);
39 __vmx_vmwrite(VMCS_GUEST_CS_ACCESS_RIGHTS, Cs->Attributes.AsUInt);
40 __vmx_vmwrite(VMCS_GUEST_CS_SELECTOR, Cs->Selector);
41}

◆ SetGuestCsSel()

VOID SetGuestCsSel ( PVMX_SEGMENT_SELECTOR Cs)

Set just the Guest Cs selector.

Parameters
CsThe CS Selector for the guest
Returns
VOID
23{
24 __vmx_vmwrite(VMCS_GUEST_CS_SELECTOR, Cs->Selector);
25}

◆ SetGuestDr0()

VOID SetGuestDr0 ( UINT64 value)

Set the Guest Dr0 Register.

Parameters
Dr0The Dr0 Value for the guest
Returns
VOID
592{
593 __writedr(0, value);
594}

◆ SetGuestDr1()

VOID SetGuestDr1 ( UINT64 value)

Set the Guest Dr1 Register.

Parameters
Dr1The Dr1 Value for the guest
Returns
VOID
604{
605 __writedr(1, value);
606}

◆ SetGuestDr2()

VOID SetGuestDr2 ( UINT64 value)

Set the Guest Dr2 Register.

Parameters
Dr2The Dr2 Value for the guest
Returns
VOID
616{
617 __writedr(2, value);
618}

◆ SetGuestDr3()

VOID SetGuestDr3 ( UINT64 value)

Set the Guest Dr3 Register.

Parameters
Dr3The Dr3 Value for the guest
Returns
VOID
628{
629 __writedr(3, value);
630}

◆ SetGuestDr6()

VOID SetGuestDr6 ( UINT64 value)

Set the Guest Dr6 Register.

Parameters
Dr6The Dr6 Value for the guest
Returns
VOID
640{
641 __writedr(6, value);
642}

◆ SetGuestDr7()

VOID SetGuestDr7 ( UINT64 value)

Set the Guest Dr7 Register.

Parameters
Dr7The Dr7 Value for the guest
Returns
VOID
652{
653 __writedr(7, value);
654}

◆ SetGuestDs()

VOID SetGuestDs ( PVMX_SEGMENT_SELECTOR Ds)

Set the Guest Ds selector.

Parameters
DsThe DS Selector for the guest
Returns
VOID
126{
127 VmxVmwrite64(VMCS_GUEST_DS_BASE, Ds->Base);
128 VmxVmwrite64(VMCS_GUEST_DS_LIMIT, Ds->Limit);
129 VmxVmwrite64(VMCS_GUEST_DS_ACCESS_RIGHTS, Ds->Attributes.AsUInt);
130 VmxVmwrite64(VMCS_GUEST_DS_SELECTOR, Ds->Selector);
131}

◆ SetGuestDsSel()

VOID SetGuestDsSel ( PVMX_SEGMENT_SELECTOR Ds)

Set just the Guest Ds selector.

Parameters
DsThe DS Selector for the guest
Returns
VOID
114{
115 VmxVmwrite64(VMCS_GUEST_DS_SELECTOR, Ds->Selector);
116}

◆ SetGuestEs()

VOID SetGuestEs ( PVMX_SEGMENT_SELECTOR Es)

Set the Guest Es selector.

Parameters
EsThe ES Selector for the guest
Returns
VOID
261{
262 VmxVmwrite64(VMCS_GUEST_ES_BASE, Es->Base);
263 VmxVmwrite64(VMCS_GUEST_ES_LIMIT, Es->Limit);
264 VmxVmwrite64(VMCS_GUEST_ES_ACCESS_RIGHTS, Es->Attributes.AsUInt);
265 VmxVmwrite64(VMCS_GUEST_ES_SELECTOR, Es->Selector);
266}

◆ SetGuestEsSel()

VOID SetGuestEsSel ( PVMX_SEGMENT_SELECTOR Es)

Set just the Guest Es selector.

Parameters
EsThe ES Selector for the guest
Returns
VOID
249{
250 VmxVmwrite64(VMCS_GUEST_ES_SELECTOR, Es->Selector);
251}

◆ SetGuestFs()

VOID SetGuestFs ( PVMX_SEGMENT_SELECTOR Fs)

Set the Guest Fs selector.

Parameters
FsThe FS Selector for the guest
Returns
VOID
171{
172 VmxVmwrite64(VMCS_GUEST_FS_BASE, Fs->Base);
173 VmxVmwrite64(VMCS_GUEST_FS_LIMIT, Fs->Limit);
174 VmxVmwrite64(VMCS_GUEST_FS_ACCESS_RIGHTS, Fs->Attributes.AsUInt);
175 VmxVmwrite64(VMCS_GUEST_FS_SELECTOR, Fs->Selector);
176}

◆ SetGuestFsSel()

VOID SetGuestFsSel ( PVMX_SEGMENT_SELECTOR Fs)

Set just the Guest Fs selector.

Parameters
FsThe FS Selector for the guest
Returns
VOID
159{
160 VmxVmwrite64(VMCS_GUEST_FS_SELECTOR, Fs->Selector);
161}

◆ SetGuestGdtr()

VOID SetGuestGdtr ( UINT64 Gdtr)

Set the Guest Gdtr.

Parameters
GdtrThe Gdtr Selector for the guest
Returns
VOID
348{
349 VmxVmwrite64(VMCS_GUEST_GDTR_BASE, Gdtr);
350}

◆ SetGuestGs()

VOID SetGuestGs ( PVMX_SEGMENT_SELECTOR Gs)

Set the Guest Gs selector.

Parameters
GsThe GS Selector for the guest
Returns
VOID
216{
217 VmxVmwrite64(VMCS_GUEST_GS_BASE, Gs->Base);
218 VmxVmwrite64(VMCS_GUEST_GS_LIMIT, Gs->Limit);
219 VmxVmwrite64(VMCS_GUEST_GS_ACCESS_RIGHTS, Gs->Attributes.AsUInt);
220 VmxVmwrite64(VMCS_GUEST_GS_SELECTOR, Gs->Selector);
221}

◆ SetGuestGsSel()

VOID SetGuestGsSel ( PVMX_SEGMENT_SELECTOR Gs)

Set just the Guest Gs selector.

Parameters
GsThe GS Selector for the guest
Returns
VOID
204{
205 VmxVmwrite64(VMCS_GUEST_GS_SELECTOR, Gs->Selector);
206}

◆ SetGuestIdtr()

VOID SetGuestIdtr ( UINT64 Idtr)

Set the Guest Idtr.

Parameters
IdtrThe Idtr Selector for the guest
Returns
VOID
294{
295 VmxVmwrite64(VMCS_GUEST_IDTR_BASE, Idtr);
296}

◆ SetGuestLdtr()

VOID SetGuestLdtr ( UINT64 Ldtr)

Set the Guest Ldtr.

Parameters
LdtrThe Idtr Selector for the guest
Returns
VOID
321{
322 VmxVmwrite64(VMCS_GUEST_LDTR_BASE, Ldtr);
323}

◆ SetGuestRFlags()

VOID SetGuestRFlags ( UINT64 RFlags)

Set the Guest RFLAGS Register.

Parameters
RflagsThe Rflags Value for the guest
Returns
VOID
399{
400 VmxVmwrite64(VMCS_GUEST_RFLAGS, RFlags);
401}

◆ SetGuestRIP()

VOID SetGuestRIP ( UINT64 RIP)

Set the Guest RIP Register.

Parameters
RIPThe RIP Value for the guest
Returns
VOID
424{
425 VmxVmwrite64(VMCS_GUEST_RIP, RIP);
426}

◆ SetGuestRSP()

VOID SetGuestRSP ( UINT64 RSP)

Set the Guest RSP Register.

Parameters
RSPThe RSP Value for the guest
Returns
VOID
436{
437 VmxVmwrite64(VMCS_GUEST_RSP, RSP);
438}

◆ SetGuestSs()

VOID SetGuestSs ( PVMX_SEGMENT_SELECTOR Ss)

Set the Guest Ss selector.

Parameters
SsThe SS Selector for the guest
Returns
VOID
81{
82 VmxVmwrite64(VMCS_GUEST_SS_BASE, Ss->Base);
83 VmxVmwrite64(VMCS_GUEST_SS_LIMIT, Ss->Limit);
84 VmxVmwrite64(VMCS_GUEST_SS_ACCESS_RIGHTS, Ss->Attributes.AsUInt);
85 VmxVmwrite64(VMCS_GUEST_SS_SELECTOR, Ss->Selector);
86}

◆ SetGuestSsSel()

VOID SetGuestSsSel ( PVMX_SEGMENT_SELECTOR Ss)

Set just the Guest Ss selector.

Parameters
SsThe SS Selector for the guest
Returns
VOID
69{
70 __vmx_vmwrite(VMCS_GUEST_SS_SELECTOR, Ss->Selector);
71}

◆ SetGuestTr()

VOID SetGuestTr ( UINT64 Tr)
Parameters
TrThe Tr Selector for the guest
Returns
VOID
373{
374 VmxVmwrite64(VMCS_GUEST_TR_BASE, Tr);
375}